sun386 host/target/native separation
[deliverable/binutils-gdb.git] / gdb / signame.c
index 57759d7600dd51001f285a34c49b0ffdfff1e70f..f96b74ef35c47ce358e6d9adc666efdce71b7a90 100755 (executable)
@@ -1,5 +1,5 @@
-/* Convert between signal names and numbers.
-   Copyright (C) 1990 Free Software Foundation, Inc.
+/* Convert between signal names and numbers, for GDB.
+   Copyright 1990, 1991, 1992 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -17,25 +17,22 @@ 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>
+/* GDB-specific, FIXME.  (This is for the SYS_SIGLIST_MISSING define).  */
+#include "defs.h"
 #include <signal.h>
 #include "signame.h"
 
-/* GDB-specific, FIXME.  (This is for the SYS_SIGLIST_MISSING define).  */
-#include "defs.h"
-#include "param.h"
+static void
+init_sig PARAMS ((int, const char *, const char *));
 
-#ifdef __STDC__
-#define CONST const
-#else
-#define CONST
-#endif
+static void
+init_sigs PARAMS ((void));
 
 #if SYS_SIGLIST_MISSING
 /* There is too much variation in Sys V signal numbers and names, so
    we must initialize them at runtime.  */
 
-static CONST char undoc[] = "unknown signal";
+static const char undoc[] = "unknown signal";
 
 /* We'd like to make this const char*[], but whoever's using it might
    want to assign from it to a char*.  */
@@ -47,18 +44,19 @@ char *sys_siglist[NSIG];
 typedef struct
   {
     int number;
-    CONST char *abbrev;
+    const char *abbrev;
   } num_abbrev;
 static num_abbrev sig_table[NSIG*2];
 /* Number of elements of sig_table used.  */
 static int sig_table_nelts = 0;
 
 /* Enter signal number NUMBER into the tables with ABBREV and NAME.  */
+/* ARGSUSED */
 static void
 init_sig (number, abbrev, name)
      int number;
-     CONST char *abbrev;
-     CONST char *name;
+     const char *abbrev;
+     const char *name;
 {
 #if SYS_SIGLIST_MISSING
   sys_siglist[number] = (char *) name;
@@ -200,6 +198,12 @@ static void init_sigs ()
 #if defined (SIGLOST)
   init_sig (SIGLOST, "LOST", "Resource lost");
 #endif
+#if defined (SIGWAITING)
+  init_sig (SIGWAITING, "WAITING", "Process's LWPs are blocked");  /* FIXME */
+#endif
+#if defined (SIGLWP)
+  init_sig (SIGLWP, "LWP", "Signal LWP");              /* FIXME description */
+#endif
 }
 
 /* Return the abbreviation for signal NUMBER.  */
@@ -219,7 +223,7 @@ sig_abbrev (number)
    signal by that name.  */
 int
 sig_number (abbrev)
-     CONST char *abbrev;
+     const char *abbrev;
 {
   int i;
 
@@ -240,7 +244,7 @@ sig_number (abbrev)
 void
 psignal (signal, message)
      unsigned signal;
-     CONST char *message;
+     const char *message;
 {
   if (signal <= 0 || signal >= NSIG)
     fprintf (stderr, "%s: unknown signal", message);
This page took 0.024926 seconds and 4 git commands to generate.