aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHui Zhu <teawater@gmail.com>2012-06-16 15:07:35 +0000
committerHui Zhu <teawater@gmail.com>2012-06-16 15:07:35 +0000
commit7ecbc8255e41dc2a0dd28edc1e48c2dbe683f3a7 (patch)
tree8efb21291e6047d22dc578edf30e66e3ff1967f4
parent233dfcf06d379c41f7c0e8cc024ad16eeb7f3636 (diff)
downloadfsf-binutils-gdb-7ecbc8255e41dc2a0dd28edc1e48c2dbe683f3a7.zip
fsf-binutils-gdb-7ecbc8255e41dc2a0dd28edc1e48c2dbe683f3a7.tar.gz
fsf-binutils-gdb-7ecbc8255e41dc2a0dd28edc1e48c2dbe683f3a7.tar.bz2
2012-06-15 Hui Zhu <hui_zhu@mentor.com>
* tracepoint.c (tfile_xfer_partial): Add a lseek.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/tracepoint.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d7f4028a..2fb662a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2012-06-15 Hui Zhu <hui_zhu@mentor.com>
+
+ * tracepoint.c (tfile_xfer_partial): Add a lseek.
+
2012-06-15 H.J. Lu <hongjiu.lu@intel.com>
* amd64-linux-nat.c (ps_get_thread_area): Check bits_per_word
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 63f66c7..6d76f4b 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -4545,6 +4545,8 @@ tfile_xfer_partial (struct target_ops *ops, enum target_object object,
if (amt > len)
amt = len;
+ if (maddr != offset)
+ lseek (trace_fd, offset - maddr, SEEK_CUR);
tfile_read (readbuf, amt);
return amt;
}