2002-05-09 Daniel Jacobowitz <drow@mvista.com>
authorDaniel Jacobowitz <drow@false.org>
Thu, 9 May 2002 22:20:29 +0000 (22:20 +0000)
committerDaniel Jacobowitz <drow@false.org>
Thu, 9 May 2002 22:20:29 +0000 (22:20 +0000)
        * signals/signals.c (signals): Remove conditional compilation around
        Mach-specific signals.  Move them to after TARGET_SIGNAL_DEFAULT.
        (target_signal_from_name): Loop until TARGET_SIGNAL_LAST.

gdb/ChangeLog
gdb/signals/signals.c

index db01b696dadc74d03911e6f404249f70c65e950c..9c0db6f5755831538ad897739b88a9441a874c60 100644 (file)
@@ -1,3 +1,9 @@
+2002-05-09  Daniel Jacobowitz  <drow@mvista.com>
+
+       * signals.h: Update comments.
+       (enum target_signal): Remove conditional compilation around
+       Mach-specific signals.  Move them to after TARGET_SIGNAL_DEFAULT.
+
 2002-05-09  Michael Snyder  <msnyder@redhat.com>
 
        * remote-rdp.c (remote_rdp_can_run): Remove.
index 774d70ab84e54c5d02e22976779c8cc5d92533be..643e450fbbe02ccb0f84f41d83c1dc990ea942d4 100644 (file)
@@ -180,7 +180,11 @@ static struct {
   {"SIG126", "Real-time event 126"},
   {"SIG127", "Real-time event 127"},
 
-#if defined(MACH) || defined(__MACH__)
+  {"SIGINFO", "Information request"},
+
+  {NULL, "Unknown signal"},
+  {NULL, "Internal error: printing TARGET_SIGNAL_DEFAULT"},
+
   /* Mach exceptions */
   {"EXC_BAD_ACCESS", "Could not access memory"},
   {"EXC_BAD_INSTRUCTION", "Illegal instruction/operand"},
@@ -188,11 +192,6 @@ static struct {
   {"EXC_EMULATION", "Emulation instruction"},
   {"EXC_SOFTWARE", "Software generated exception"},
   {"EXC_BREAKPOINT", "Breakpoint"},
-#endif
-  {"SIGINFO", "Information request"},
-
-  {NULL, "Unknown signal"},
-  {NULL, "Internal error: printing TARGET_SIGNAL_DEFAULT"},
 
   /* Last entry, used to check whether the table is the right size.  */
   {NULL, "TARGET_SIGNAL_MAGIC"}
@@ -237,9 +236,10 @@ target_signal_from_name (char *name)
 
   /* This ugly cast brought to you by the native VAX compiler.  */
   for (sig = TARGET_SIGNAL_HUP;
-       signals[sig].name != NULL;
+       sig < TARGET_SIGNAL_LAST;
        sig = (enum target_signal) ((int) sig + 1))
-    if (strcmp (name, signals[sig].name) == 0)
+    if (signals[sig].name != NULL
+       && strcmp (name, signals[sig].name) == 0)
       return sig;
   return TARGET_SIGNAL_UNKNOWN;
 }
This page took 0.027081 seconds and 4 git commands to generate.