2012-03-01 Pedro Alves <palves@redhat.com>
[deliverable/binutils-gdb.git] / gdb / common / signals.c
index 321319aa20d5083227986ac866fa38d991bc31a4..2e82e9cc15b1684ad8d617b9f7e6d4d7b207f637 100644 (file)
@@ -1,7 +1,5 @@
 /* Target signal translation functions for GDB.
-   Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2006, 2007, 2008, 2009, 2010, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 1990-2003, 2006-2012 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
    This file is part of GDB.
@@ -48,7 +46,8 @@ struct gdbarch;
 # endif
 #endif
 
-/* This table must match in order and size the signals in enum target_signal.  */
+/* This table must match in order and size the signals in enum
+   target_signal.  */
 
 static const struct {
   const char *name;
@@ -348,7 +347,8 @@ target_signal_from_host (int hostsig)
        return (enum target_signal)
          (hostsig - 64 + (int) TARGET_SIGNAL_REALTIME_64);
       else
-       error ("GDB bug: target.c (target_signal_from_host): unrecognized real-time signal");
+       error (_("GDB bug: target.c (target_signal_from_host): "
+              "unrecognized real-time signal"));
     }
 #endif
 
@@ -642,52 +642,10 @@ target_signal_to_host (enum target_signal oursig)
     {
       /* The user might be trying to do "signal SIGSAK" where this system
          doesn't have SIGSAK.  */
-      warning ("Signal %s does not exist on this system.\n",
+      warning (_("Signal %s does not exist on this system."),
               target_signal_to_name (oursig));
       return 0;
     }
   else
     return targ_signo;
 }
-
-#ifndef GDBSERVER
-
-/* In some circumstances we allow a command to specify a numeric
-   signal.  The idea is to keep these circumstances limited so that
-   users (and scripts) develop portable habits.  For comparison,
-   POSIX.2 `kill' requires that 1,2,3,6,9,14, and 15 work (and using a
-   numeric signal at all is obsolescent.  We are slightly more
-   lenient and allow 1-15 which should match host signal numbers on
-   most systems.  Use of symbolic signal names is strongly encouraged.  */
-
-enum target_signal
-target_signal_from_command (int num)
-{
-  if (num >= 1 && num <= 15)
-    return (enum target_signal) num;
-  error ("Only signals 1-15 are valid as numeric signals.\n\
-Use \"info signals\" for a list of symbolic signals.");
-}
-
-extern initialize_file_ftype _initialize_signals; /* -Wmissing-prototype */
-
-void
-_initialize_signals (void)
-{
-  if (strcmp (signals[TARGET_SIGNAL_LAST].string, "TARGET_SIGNAL_MAGIC") != 0)
-    internal_error (__FILE__, __LINE__, "failed internal consistency check");
-}
-
-int
-default_target_signal_to_host (struct gdbarch *gdbarch, enum target_signal ts)
-{
-  return target_signal_to_host (ts);
-}
-
-enum target_signal
-default_target_signal_from_host (struct gdbarch *gdbarch, int signo)
-{
-  return target_signal_from_host (signo);
-}
-
-#endif /* ! GDBSERVER */
This page took 0.02442 seconds and 4 git commands to generate.