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 4/5] ctf doc and NEWS.


This is almost the same as previous version, except that I update the
example according to the current output of GDB and write three NEWS
entries for this series.

2013-02-27  Hui Zhu  <hui_zhu@mentor.com>
	    Yao Qi  <yao@codesourcery.com>

	* gdb.texinfo (Trace Files): Add "tsave -ctf" and target ctf.
	* NEWS: Mention these changes.
---
 gdb/NEWS            |    7 +++++++
 gdb/doc/gdb.texinfo |   38 ++++++++++++++++++++++++++++++++------
 2 files changed, 39 insertions(+), 6 deletions(-)

diff --git a/gdb/NEWS b/gdb/NEWS
index 0877aa2..ba312eb 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -69,6 +69,8 @@ Lynx 178 PowerPC		powerpc-*-lynx*178
 
 * The command 'info tracepoints' can now display 'installed on target'
   or 'not installed on target' for each non-pending location of tracepoint.
+* The command 'tsave' can now support new option '-ctf' to save trace
+  buffer into Common Trace Format.
 
 * New configure options
 
@@ -78,6 +80,9 @@ Lynx 178 PowerPC		powerpc-*-lynx*178
   Release versions, on the other hand, are built without -lmcheck
   by default.  The --enable-libmcheck/--disable-libmcheck configure
   options allow the user to override that default.
+--with-babeltrace/--with-babeltrace-include/--with-babeltrace-lib
+  This configure option allows the user to build GDB with
+  libbabeltrace by which GDB can read Common Trace Format data.
 
 * New commands (for set/show, see "New options" below)
 
@@ -153,6 +158,8 @@ show filename-display
   ** Output of the "-trace-status" command includes a "trace-file" field 
      containing the name of the trace file being examined.  This field is
      optional, and only present when examining a trace file.
+  ** The -trace-save MI command can optionally save trace buffer into Common
+     Trace Format now.
 
 * GDB now supports the "mini debuginfo" section, .gnu_debugdata.
   You must have the LZMA library available when configuring GDB for this
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 5f39d2e..9080763 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -12120,6 +12120,7 @@ of trace data, via the @code{target tfile} command.
 
 @kindex tsave
 @item tsave [ -r ] @var{filename}
+@itemx tsave [-ctf] @var{dirname}
 Save the trace data to @var{filename}.  By default, this command
 assumes that @var{filename} refers to the host filesystem, so if
 necessary @value{GDBN} will copy raw trace data up from the target and
@@ -12128,16 +12129,41 @@ optional argument @code{-r} (``remote'') to direct the target to save
 the data directly into @var{filename} in its own filesystem, which may be
 more efficient if the trace buffer is very large.  (Note, however, that
 @code{target tfile} can only read from files accessible to the host.)
+By default, this command will save trace frame into tfile format.
+You can supply the optional argument @code{-ctf} to save date in CTF
+format.  The @dfn{Common Trace Format} (CTF) is proposed as a trace format
+that can be shared by multiple debugging and tracing tools.  Please go to
+@indicateurl{http://www.efficios.com/ctf} to get more information.
 
 @kindex target tfile
 @kindex tfile
 @item target tfile @var{filename}
-Use the file named @var{filename} as a source of trace data.  Commands
-that examine data work as they do with a live target, but it is not
-possible to run any new trace experiments.  @code{tstatus} will report
-the state of the trace run at the moment the data was saved, as well
-as the current trace frame you are examining.  @var{filename} must be
-on a filesystem accessible to the host.
+@kindex target ctf
+@kindex ctf
+@itemx target ctf @var{dirname}
+Use the file named @var{filename} or directory named @var{dirname} as
+a source of trace data.  Commands that examine data work as they do with
+a live target, but it is not possible to run any new trace experiments.
+@code{tstatus} will report the state of the trace run at the moment
+the data was saved, as well as the current trace frame you are examining.
+@var{filename} or @var{dirname} must be on a filesystem accessible to
+the host.
+
+@smallexample
+(@value{GDBP}) target ctf ctf.ctf
+(@value{GDBP}) tfind
+Found trace frame 0, tracepoint 2
+39            ++a;  /* set tracepoint 1 here */
+(@value{GDBP}) tdump
+Data collected at tracepoint 2, trace frame 0:
+i = 0
+a = 0
+b = 1 '\001'
+c = @{"123", "456", "789", "123", "456", "789"@}
+d = @{@{@{a = 1, b = 2@}, @{a = 3, b = 4@}@}, @{@{a = 5, b = 6@}, @{a = 7, b = 8@}@}@}
+(@value{GDBP}) p b
+$1 = 1
+@end smallexample
 
 @end table
 
-- 
1.7.7.6


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