* 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
+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
+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.
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, ...));
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);
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
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);
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);
error ("Trace can only be run on remote targets.");
}
+unsigned long trace_running_p;
+
/* tstatus command */
static void
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.");
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 *));