This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Make tstatus actually display some status
- From: Stan Shebs <stan at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 30 Dec 2009 18:23:07 -0800
- Subject: [PATCH] Make tstatus actually display some status
For reasons lost in the mists of time, tstatus doesn't actually display
any trace status. While some might say this is in the very best Unix
tradition ("eh?"), users of tracepoints really do need to know what is
going on. This little patch is just a taste; post-target-vector-change,
there will be a target method / protocol addition that will provide much
more detail. Committed to trunk.
Stan
2009-12-30 Stan Shebs <stan@codesourcery.com>
* tracepoint.c (trace_status_command): Add some status output.
Index: tracepoint.c
===================================================================
RCS file: /cvs/src/src/gdb/tracepoint.c,v
retrieving revision 1.130
diff -p -r1.130 tracepoint.c
*** tracepoint.c 30 Dec 2009 16:11:06 -0000 1.130
--- tracepoint.c 30 Dec 2009 22:28:02 -0000
*************** trace_status_command (char *args, int fr
*** 1736,1741 ****
--- 1736,1753 ----
/* exported for use by the GUI */
trace_running_p = (target_buf[1] == '1');
+
+ if (trace_running_p)
+ printf_filtered (_("Trace is running on the target.\n"));
+ else
+ printf_filtered (_("Trace is not running on the target.\n"));
+
+ if (traceframe_number >= 0)
+ printf_filtered (_("Looking at trace frame %d, tracepoint %d.\n"),
+ traceframe_number, tracepoint_number);
+ else
+ printf_filtered (_("Not looking at any trace frame.\n"));
+
}
else
error (_("Trace can only be run on remote targets."));