2012-06-15 Hui Zhu <hui_zhu@mentor.com>
authorHui Zhu <teawater@gmail.com>
Sat, 16 Jun 2012 15:07:35 +0000 (15:07 +0000)
committerHui Zhu <teawater@gmail.com>
Sat, 16 Jun 2012 15:07:35 +0000 (15:07 +0000)
* tracepoint.c (tfile_xfer_partial): Add a lseek.

gdb/ChangeLog
gdb/tracepoint.c

index d7f4028..2fb662a 100644 (file)
@@ -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
index 63f66c7..6d76f4b 100644 (file)
@@ -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;
            }