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 d7f4028a9b88b0c8e2a986125072fb3d77ac13be..2fb662a415257ba6e6be9d9215d040d5142311a2 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 63f66c7b73f5ed47b22b4b05836ae8caa348117e..6d76f4b1bfca6d474befc47d03566e1816106199 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;
            }