* inftarg.c (child_thread_alive): New function to see if a
[deliverable/binutils-gdb.git] / gdb / infcmd.c
index 3e9082b9bf0bb409c28394276491f670bf327588..0ca4d5668e192090dad665070e03d3161ade1319 100644 (file)
@@ -474,8 +474,12 @@ signal_command (signum_exp, from_tty)
   if (oursig == TARGET_SIGNAL_UNKNOWN)
     {
       /* No, try numeric.  */
-      oursig =
-       target_signal_from_command (parse_and_eval_address (signum_exp));
+      int num = parse_and_eval_address (signum_exp);
+
+      if (num == 0)
+       oursig = TARGET_SIGNAL_0;
+      else
+       oursig = target_signal_from_command (num);
     }
 
   if (from_tty)
@@ -488,7 +492,11 @@ signal_command (signum_exp, from_tty)
     }
 
   clear_proceed_status ();
-  proceed (stop_pc, oursig, 0);
+  /* "signal 0" should not get stuck if we are stopped at a breakpoint.
+     FIXME: Neither should "signal foo" but when I tried passing
+     (CORE_ADDR)-1 unconditionally I got a testsuite failure which I haven't
+     tried to track down yet.  */
+  proceed (oursig == TARGET_SIGNAL_0 ? (CORE_ADDR) -1 : stop_pc, oursig, 0);
 }
 
 /* Call breakpoint_auto_delete on the current contents of the bpstat
This page took 0.023435 seconds and 4 git commands to generate.