Blob Blame History Raw
diff -Naur insight-7.4.50.orig/gdb/gdbtk/generic/gdbtk-hooks.c insight-7.4.50.new/gdb/gdbtk/generic/gdbtk-hooks.c
--- insight-7.4.50.orig/gdb/gdbtk/generic/gdbtk-hooks.c	2012-03-28 15:09:12.000000000 +0200
+++ insight-7.4.50.new/gdb/gdbtk/generic/gdbtk-hooks.c	2012-04-05 12:44:20.284306992 +0200
@@ -804,7 +804,7 @@
 gdbtk_annotate_signal (void)
 {
   char *buf;
-  struct thread_info *tp = inferior_thread ();
+  struct thread_info *tp;
 
   /* Inform gui that the target has stopped. This is
      a necessary stop button evil. We don't want signal notification
@@ -812,6 +812,11 @@
      timeout. */
   Tcl_Eval (gdbtk_interp, "gdbtk_stop_idle_callback");
 
+  if (ptid_equal(inferior_ptid, null_ptid))
+    return;
+
+  tp = inferior_thread ();
+
   buf = xstrprintf ("gdbtk_signal %s {%s}",
 	     target_signal_to_name (tp->suspend.stop_signal),
 	     target_signal_to_string (tp->suspend.stop_signal));