aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtk.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/gdbtk.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/gdbtk.c')
-rw-r--r--gdb/gdbtk.c22
1 files changed, 21 insertions, 1 deletions
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);