From 7ecbc8255e41dc2a0dd28edc1e48c2dbe683f3a7 Mon Sep 17 00:00:00 2001 From: Hui Zhu Date: Sat, 16 Jun 2012 15:07:35 +0000 Subject: [PATCH] 2012-06-15 Hui Zhu * tracepoint.c (tfile_xfer_partial): Add a lseek. --- gdb/ChangeLog | 4 ++++ gdb/tracepoint.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d7f4028a9b8..2fb662a4152 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2012-06-15 Hui Zhu + + * tracepoint.c (tfile_xfer_partial): Add a lseek. + 2012-06-15 H.J. Lu * amd64-linux-nat.c (ps_get_thread_area): Check bits_per_word diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 63f66c7b73f..6d76f4b1bfc 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; } -- 2.30.2