diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 1998-03-27 03:36:27 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 1998-03-27 03:36:27 +0000 |
commit | 411589588ad4b9c31e68ca69378a9efcefe24321 (patch) | |
tree | 06448722792da1f4d68dcab0429a8f42efb7c745 | |
parent | 6d133cc9dff70d06c61e9347e06bd22f7edf9c77 (diff) | |
download | gdb-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
-rw-r--r-- | gdb/ChangeLog | 33 | ||||
-rw-r--r-- | gdb/ChangeLog-gdbtk | 6 | ||||
-rw-r--r-- | gdb/gdbtk.c | 22 | ||||
-rw-r--r-- | gdb/tracepoint.c | 13 | ||||
-rw-r--r-- | gdb/tracepoint.h | 2 |
5 files changed, 73 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6dee22c..8d75ca3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,36 @@ +Thu Mar 26 22:29:28 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com> + + * 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 + +start-sanitize-sky +Wed Mar 25 11:45:19 1998 Frank Ch. Eigler <fche@cygnus.com> + + * configure.in (sim-gpu2): Added target type checking to make + --with-sim-gpu2 option only valid for sky target. + * configure: Regenerated. +end-sanitize-sky + +Tue Mar 24 16:22:40 1998 Stu Grossman <grossman@bhuna.cygnus.co.uk> + + * Makefile.in: Derive SHELL from configure. + * config/d10v/d10v.mt config/d30v/d30v.mt config/m32r/m32r.mt + config/mn10200/mn10200.mt config/mn10300/mn10300.mt : Remove -lm + from SIM. This prevents dependency checking of -lm (under NT + native builds). (It is automatically added by configure if it + exists.) + * doc/configure mswin/configure nlm/configure + testsuite/gdb.base/configure testsuite/gdb.c++/configure + testsuite/gdb.chill/configure testsuite/gdb.disasm/configure + testsuite/gdb.stabs/configure testsuite/gdb.threads/configure: + Regenerate with autoconf 2.12.1 to fix shell issues for NT native + builds. + Mon Mar 23 18:10:57 1998 Ulrich Drepper (drepper@cygnus.com) * solib.c (solib_create_inferior_hook): Rewrite previous diff --git a/gdb/ChangeLog-gdbtk b/gdb/ChangeLog-gdbtk index 2eb4d00..1cba556 100644 --- a/gdb/ChangeLog-gdbtk +++ b/gdb/ChangeLog-gdbtk @@ -1,3 +1,9 @@ +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. + Thu Mar 26 12:00:35 1998 Martin M. Hunt <hunt@cygnus.com> * gdbtk.c (gdbtk_fputs): Insert fencepost. diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c index f1ee5fc..d9a0324 100644 --- a/gdb/gdbtk.c +++ b/gdb/gdbtk.c @@ -148,6 +148,7 @@ static int map_arg_registers PARAMS ((int, char *[], void (*) (int, void *), voi static void get_register_name PARAMS ((int, void *)); static int gdb_regnames PARAMS ((ClientData, Tcl_Interp *, int, char *[])); static void get_register PARAMS ((int, void *)); +static int gdb_trace_status PARAMS ((ClientData, Tcl_Interp *, int, char *argv[])); static int gdb_target_has_execution_command PARAMS ((ClientData, Tcl_Interp *, int, char *argv[])); static int gdb_load_info PARAMS ((ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[])); void TclDebug PARAMS ((const char *fmt, ...)); @@ -2139,6 +2140,9 @@ gdbtk_init ( argv0 ) Tcl_CreateCommand (interp, "gdb_target_has_execution", gdb_target_has_execution_command, NULL, NULL); + Tcl_CreateCommand (interp, "gdb_is_tracing", + gdb_trace_status, + NULL, NULL); Tcl_CreateObjCommand (interp, "gdb_load_info", gdb_load_info, NULL, NULL); Tcl_CreateObjCommand (interp, "gdb_get_locals", gdb_get_vars_command, (ClientData) 0, NULL); @@ -2375,6 +2379,22 @@ gdb_target_has_execution_command (clientData, interp, argc, argv) return TCL_OK; } +static int +gdb_trace_status (clientData, interp, argc, argv) + ClientData clientData; + Tcl_Interp *interp; + int argc; + char *argv[]; +{ + int result = 0; + + if (trace_running_p) + result = 1; + + Tcl_SetIntObj (Tcl_GetObjResult (interp), result); + return TCL_OK; +} + /* gdb_load_info - returns information about the file about to be downloaded */ static int @@ -2797,7 +2817,7 @@ tracepoint_notify(tp, action) if (filename == NULL) filename = "N/A"; sprintf (buf, "gdbtk_tcl_tracepoint %s %d 0x%lx %d {%s}", action, tp->number, - (long)tp->address, sal.line, filename); + (long)tp->address, sal.line, filename, tp->pass_count); v = Tcl_Eval (interp, buf); 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."); diff --git a/gdb/tracepoint.h b/gdb/tracepoint.h index ad6a7b0..8f6198f 100644 --- a/gdb/tracepoint.h +++ b/gdb/tracepoint.h @@ -94,6 +94,8 @@ struct tracepoint extern struct tracepoint *tracepoint_chain; +extern unsigned long trace_running_p; + /* A hook used to notify the UI of tracepoint operations */ void (*create_tracepoint_hook) PARAMS ((struct tracepoint *)); |