]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Thu Mar 26 22:29:28 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>
Fri, 27 Mar 1998 03:36:27 +0000 (03:36 +0000)
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>
Fri, 27 Mar 1998 03:36:27 +0000 (03:36 +0000)
        * 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

gdb/ChangeLog
gdb/ChangeLog-gdbtk
gdb/gdbtk.c
gdb/tracepoint.c
gdb/tracepoint.h

index 6dee22ccd49997a04afa81949d0af96a3ef03a3e..8d75ca305da1aa4795ec3cae539c295ad4d8c3b2 100644 (file)
@@ -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
index 2eb4d00cb389afe6268bf96b2abe453927787be3..1cba5565db3784bacf99720302d74a5d7f6992d4 100644 (file)
@@ -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.
index f1ee5fc956aafb5d7422bc19a2e92d9a1cbca399..d9a0324a780ff467d856c6b4704340ec36756e15 100644 (file)
@@ -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);
 
index cd809ffe209b449eb2cbf3778dd7efa08ea5cf7a..42863538e3e26520259bcbebead4ff3e4694686f 100644 (file)
@@ -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.");
index ad6a7b0d9a7d4172af7e5bf38ec61474ad367ea2..8f6198fe904f3402825f141871dc21cd42404546 100644 (file)
@@ -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 *));