* energize.c (send_location): New routine to consolidate all
[deliverable/binutils-gdb.git] / gdb / convex-tdep.c
index 03da95dd2142afd0872396a696bd4005b3804c41..ac213aef7ddf2c68e4868ecf47cebba006d87447 100644 (file)
@@ -1,5 +1,5 @@
 /* Convex stuff for GDB.
-   Copyright (C) 1990 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1991 Free Software Foundation, Inc.
 
 This file is part of GDB.
 
@@ -17,9 +17,7 @@ You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
-#include <stdio.h>
 #include "defs.h"
-#include "param.h"
 #include "command.h"
 #include "symtab.h"
 #include "value.h"
@@ -666,8 +664,10 @@ subsig_name (signo, subcode)
     {0, 0, 0, 0, subsig4, subsig5, 0, 0, subsig8, 0, subsig10, subsig11, 0};
 
   int i;
-  char *p = signo < NSIG ? sys_siglist[signo] : "unknown";
+  char *p;
 
+  if ((p = strsignal (signo)) == NULL)
+    p = "unknown";
   if (signo >= (sizeof subsig_list / sizeof *subsig_list)
       || !subsig_list[signo])
     return p;
@@ -760,18 +760,15 @@ comm_registers_info (arg)
 
   if (arg)
     {
-      if (sscanf (arg, "0x%x", &regnum) == 1
-         || sscanf (arg, "%d", &regnum) == 1)
-       {
-         if (regnum > 0)
-           regnum &= ~0x8000;
-       }
-      else if (sscanf (arg, "$c%d", &regnum) == 1)
+             if (sscanf (arg, "$c%d", &regnum) == 1) {
        ;
-      else if (sscanf (arg, "$C%d", &regnum) == 1)
+      } else if (sscanf (arg, "$C%d", &regnum) == 1) {
        ;
-      else
+      } else {
        regnum = parse_and_eval_address (arg);
+       if (regnum > 0)
+         regnum &= ~0x8000;
+      }
 
       if (regnum >= 64)
        error ("%s: invalid register name.", arg);
This page took 0.024606 seconds and 4 git commands to generate.