OSDN Git Service

From Pedro Alves <pedro@codesourcery.com>:
authorkseitz <kseitz>
Thu, 18 Sep 2008 18:28:44 +0000 (18:28 +0000)
committerkseitz <kseitz>
Thu, 18 Sep 2008 18:28:44 +0000 (18:28 +0000)
        * generic/gdbtk-cmds.c (gdb_cmd, gdb_immediate_command): Adjust to
        new bpstat_do_actions inferface.
        * generic/gdbtk-hooks.c: Include gdbthread.h.
        (gdbtk_annotate_signal): Get the stop_signal from the current
        thread.

gdb/gdbtk/ChangeLog
gdb/gdbtk/generic/gdbtk-cmds.c
gdb/gdbtk/generic/gdbtk-hooks.c

index 5788e47..9222c0d 100644 (file)
@@ -1,3 +1,12 @@
+2008-09-18  Keith Seitz  <keiths@redhat.com>
+
+       From Pedro Alves  <pedro@codesourcery.com>:
+       * generic/gdbtk-cmds.c (gdb_cmd, gdb_immediate_command): Adjust to
+       new bpstat_do_actions inferface.
+       * generic/gdbtk-hooks.c: Include gdbthread.h.
+       (gdbtk_annotate_signal): Get the stop_signal from the current
+       thread.
+
 2008-09-02  Keith Seitz  <keiths@redhat.com>
 
        * generic/gdbtk-cmds.c (gdb_listfuncs): Use SYMBOL_PRINT_NAME
index 785c679..3babc8c 100644 (file)
@@ -701,7 +701,7 @@ gdb_cmd (ClientData clientData, Tcl_Interp *interp,
       result_ptr->flags |= GDBTK_TO_RESULT;
     }
 
-  bpstat_do_actions (&stop_bpstat);
+  bpstat_do_actions ();
 
   return TCL_OK;
 }
@@ -752,7 +752,7 @@ gdb_immediate_command (ClientData clientData, Tcl_Interp *interp,
 
   execute_command (Tcl_GetStringFromObj (objv[1], NULL), from_tty);
 
-  bpstat_do_actions (&stop_bpstat);
+  bpstat_do_actions ();
 
   result_ptr->flags |= GDBTK_TO_RESULT;
 
index 0720dd8..cdeb615 100644 (file)
@@ -33,6 +33,7 @@
 #include "annotate.h"
 #include "cli/cli-decode.h"
 #include "observer.h"
+#include "gdbthread.h"
 
 #ifdef _WIN32
 #define WIN32_LEAN_AND_MEAN
@@ -794,9 +795,10 @@ gdbtk_error_begin ()
 \f
 /* notify GDBtk when a signal occurs */
 static void
-gdbtk_annotate_signal ()
+gdbtk_annotate_signal (void)
 {
   char *buf;
+  struct thread_info *tp = inferior_thread ();
 
   /* Inform gui that the target has stopped. This is
      a necessary stop button evil. We don't want signal notification
@@ -804,8 +806,9 @@ gdbtk_annotate_signal ()
      timeout. */
   Tcl_Eval (gdbtk_interp, "gdbtk_stop_idle_callback");
 
-  xasprintf (&buf, "gdbtk_signal %s {%s}", target_signal_to_name (stop_signal),
-            target_signal_to_string (stop_signal));
+  xasprintf (&buf, "gdbtk_signal %s {%s}",
+            target_signal_to_name (tp->stop_signal),
+            target_signal_to_string (tp->stop_signal));
   if (Tcl_Eval (gdbtk_interp, buf) != TCL_OK)
     report_error ();
   free(buf);