This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] One more for MI trace status
- From: Stan Shebs <stan at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 09 Apr 2010 13:55:05 -0700
- Subject: [PATCH] One more for MI trace status
There is one more field that's been overlooked for trace_status_mi -
total frames created. (More trace status additions are coming, perhaps
we should revisit the idea of sharing CLI and MI versions...)
I note that MI commands for tracing need testsuite. But there's a
conundrum; should tests go in gdb.mi or gdb.trace? :-)
Stan
2010-04-09 Stan Shebs <stan@codesourcery.com>
* tracepoint.c (trace_status_mi): Report frames created.
* gdb.texinfo (gdb/mi Tracepoint Commands) <-trace-status>:
Describe the `frames-created' field, tweak grammar.
Index: tracepoint.c
===================================================================
RCS file: /cvs/src/src/gdb/tracepoint.c,v
retrieving revision 1.176
diff -p -r1.176 tracepoint.c
*** tracepoint.c 9 Apr 2010 19:34:57 -0000 1.176
--- tracepoint.c 9 Apr 2010 20:45:14 -0000
*************** trace_status_mi (int on_stop)
*** 1798,1803 ****
--- 1798,1805 ----
if (ts->traceframe_count != -1)
ui_out_field_int (uiout, "frames", ts->traceframe_count);
+ if (ts->traceframes_created != -1)
+ ui_out_field_int (uiout, "frames-created", ts->traceframes_created);
if (ts->buffer_size != -1)
ui_out_field_int (uiout, "buffer-size", ts->buffer_size);
if (ts->buffer_free != -1)
Index: doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.702
diff -p -r1.702 gdb.texinfo
*** doc/gdb.texinfo 9 Apr 2010 15:22:09 -0000 1.702
--- doc/gdb.texinfo 9 Apr 2010 20:45:15 -0000
*************** present iff the @samp{stop-reason} field
*** 26421,26433 ****
@samp{passcount}.
@item frames
! This field is an integer number of currently collected frames. This
! field is optional.
@item buffer-size
@itemx buffer-free
These fields tell the current size of the tracing buffer and the
! remaining space. These field is optional.
@item circular
The value of the circular trace buffer flag. @code{1} means that the
--- 26421,26436 ----
@samp{passcount}.
@item frames
! @itemx frames-created
! The @samp{frames} field is a count of the total number of trace frames
! in the trace buffer, while @samp{frames-created} is the total created
! during the run, including ones that were discarded, such as when a
! circular trace buffer filled up. Both fields are optional.
@item buffer-size
@itemx buffer-free
These fields tell the current size of the tracing buffer and the
! remaining space. These fields are optional.
@item circular
The value of the circular trace buffer flag. @code{1} means that the