aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracepoint.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>1998-03-27 03:36:27 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>1998-03-27 03:36:27 +0000
commit411589588ad4b9c31e68ca69378a9efcefe24321 (patch)
tree06448722792da1f4d68dcab0429a8f42efb7c745 /gdb/tracepoint.c
parent6d133cc9dff70d06c61e9347e06bd22f7edf9c77 (diff)
downloadgdb-411589588ad4b9c31e68ca69378a9efcefe24321.zip
gdb-411589588ad4b9c31e68ca69378a9efcefe24321.tar.gz
gdb-411589588ad4b9c31e68ca69378a9efcefe24321.tar.bz2
Thu Mar 26 22:29:28 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* gdbtk.c: (gdb_trace_status) new function. (gdbtk_init) added command "gdb_is_tracing". (tracepoint_notify) added passcount information. * tracepoint.c (trace_status_command): Recognize a boolean return value from the stub to indicate whether trace experiment is running. Export this value as a global state variable (trace_running_p) for use by the GUI. (from Michael Snyder) (trace_pass_command) added call to modify_tracepoint_hook. * tracepoint.h export trace_running_p
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r--gdb/tracepoint.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index cd809ff..4286353 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -701,6 +701,8 @@ trace_pass_command (args, from_tty)
if (t1 == (struct tracepoint *) -1 || t1 == t2)
{
t2->pass_count = count;
+ if (modify_tracepoint_hook)
+ modify_tracepoint_hook (t2);
if (from_tty)
printf_filtered ("Setting tracepoint %d's passcount to %d\n",
t2->number, count);
@@ -1596,6 +1598,8 @@ trace_stop_command (args, from_tty)
error ("Trace can only be run on remote targets.");
}
+unsigned long trace_running_p;
+
/* tstatus command */
static void
trace_status_command (args, from_tty)
@@ -1606,8 +1610,13 @@ trace_status_command (args, from_tty)
{
putpkt ("qTStatus");
remote_get_noisy_reply (target_buf);
- if (strcmp (target_buf, "OK"))
- error ("Bogus reply from target: %s", target_buf);
+
+ if (target_buf[0] != 'T' ||
+ (target_buf[1] != '0' && target_buf[1] != '1'))
+ error ("Bogus reply from target: %s", target_buf);
+
+ /* exported for use by the GUI */
+ trace_running_p = (target_buf[1] == '1');
}
else
error ("Trace can only be run on remote targets.");