This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 0/8] Use new to_xfer_partial interface in ctf and tfile target


In previous patch series, to_xfer_partial interface returns xfer_status and
set *xfered_len when necessary, but no implementation uses it.  In this
series, we start teach to_xfer_partial in target ctf and tfile to use it.

When I modify tfile_xfer_partial and ctf_xfer_partial, I find some of code
is duplicated, and I keep adding new duplicated code into them.  I decide
to refactor them first.  This kind of refactor should be done when I added
ctf target, but I didn't do.

Patch #1 and #2 move code on trace file out of tracepoint.c, which included
a lot of stuffs.  Patch #3 and #5 share some code between ctf and tfile.
Patch #6 really matters to adjust tfile_xfer_partial and ctf_xfer_partial
to set *xfered_len and return TARGET_XFER_E_UNAVAILABLE if data is
unavailable.  Patch #7 simplify read_value_memory.

Regression tested on x86_64-linux, also run gdb.trace on x86-linux 
with babeltrace installed.

*** BLURB HERE ***

Yao Qi (8):
  Move trace file writer out of tracepoint.c
  Move tfile target to tracefile-tfile.c
  Share some code between ctf and tfile target.
  Let tracefile has_memory and has_all_memory.
  Share code on to_xfer_partial for tfile and ctf target
  Use new to_xfer_partial interface in ctf and tfile target
  Adjust read_value_memory to use to_xfer_partial
  Call target_traceframe_info when traceframe is selected.

 gdb/Makefile.in       |    4 +-
 gdb/ctf.c             |   94 +---
 gdb/exec.c            |  108 ++++-
 gdb/exec.h            |   24 +-
 gdb/remote.c          |    5 -
 gdb/target.c          |    2 +-
 gdb/target.h          |   15 +-
 gdb/tracefile-tfile.c | 1073 +++++++++++++++++++++++++++++++++++
 gdb/tracefile.c       |  462 +++++++++++++++
 gdb/tracefile.h       |  116 ++++
 gdb/tracepoint.c      | 1499 +------------------------------------------------
 gdb/tracepoint.h      |  110 +----
 gdb/valops.c          |   90 +---
 13 files changed, 1822 insertions(+), 1780 deletions(-)
 create mode 100644 gdb/tracefile-tfile.c
 create mode 100644 gdb/tracefile.c
 create mode 100644 gdb/tracefile.h

-- 
1.7.7.6


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]