Fix regression: cannot start with LD_PRELOAD=libSegFault.so (PR gdb/18653#c7)
[deliverable/binutils-gdb.git] / gdb / common / signals.c
index 3c9cd41c571aa3912737cf01bc28813b6151955b..1dfe61b966450697fffab48c6c9e06993b97b9b4 100644 (file)
@@ -1,5 +1,5 @@
 /* Target signal translation functions for GDB.
-   Copyright (C) 1990-2014 Free Software Foundation, Inc.
+   Copyright (C) 1990-2018 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
    This file is part of GDB.
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#include <string.h>
-#endif
+#include "common-defs.h"
 
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
 #endif
 
 #include "gdb_signals.h"
-#include "gdb_assert.h"
 
 struct gdbarch;
 
@@ -337,6 +331,10 @@ gdb_signal_from_host (int hostsig)
   if (hostsig == SIGINFO)
     return GDB_SIGNAL_INFO;
 #endif
+#if defined (SIGLIBRT)
+  if (hostsig == SIGLIBRT)
+    return GDB_SIGNAL_LIBRT;
+#endif
 
 #if defined (REALTIME_LO)
   if (hostsig >= REALTIME_LO && hostsig < REALTIME_HI)
@@ -590,6 +588,10 @@ do_gdb_signal_to_host (enum gdb_signal oursig,
     case GDB_SIGNAL_INFO:
       return SIGINFO;
 #endif
+#if defined (SIGLIBRT)
+    case GDB_SIGNAL_LIBRT:
+      return SIGLIBRT;
+#endif
 
     default:
 #if defined (REALTIME_LO)
This page took 0.026398 seconds and 4 git commands to generate.