]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Pass SIGLIBRT directly to child processes.
authorJohn Baldwin <jhb@FreeBSD.org>
Sun, 3 Jul 2016 18:56:21 +0000 (11:56 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Fri, 15 Jul 2016 13:35:37 +0000 (06:35 -0700)
FreeBSD's librt uses SIGLIBRT as an internal signal to implement
SIGEV_THREAD sigevent notifications.  Similar to SIGLWP or SIGCANCEL
this signal should be passed through to child processes by default.

include/ChangeLog:

* signals.def: Add GDB_SIGNAL_LIBRT.

gdb/ChangeLog:

* common/signals.c (gdb_signal_from_host): Handle SIGLIBRT.
(do_gdb_signal_to_host): Likewise.
* infrun.c (_initialize_infrun): Pass GDB_SIGNAL_LIBRT through to
programs.
* proc-events.c (signal_table): Add entry for SIGLIBRT.

gdb/ChangeLog
gdb/common/signals.c
gdb/infrun.c
gdb/proc-events.c
include/gdb/ChangeLog
include/gdb/signals.def

index 8f5a5e0c1b6b5a8e8c55b5057970514201374186..6c187dc4dfc84f5219595c412008c784ce1435ee 100644 (file)
@@ -1,3 +1,11 @@
+2016-07-15  John Baldwin  <jhb@FreeBSD.org>
+
+       * common/signals.c (gdb_signal_from_host): Handle SIGLIBRT.
+       (do_gdb_signal_to_host): Likewise.
+       * infrun.c (_initialize_infrun): Pass GDB_SIGNAL_LIBRT through to
+       programs.
+       * proc-events.c (signal_table): Add entry for SIGLIBRT.
+
 2016-07-14  Tom Tromey  <tom@tromey.com>
 
        * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Add missing
index 45c0c7341ef33be133a191aad9c50c8dbb6bf85c..f84935d47112d8be5961c6610fb728b8842b5317 100644 (file)
@@ -331,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)
@@ -584,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)
index 70a0790b9ac6c52340d41da5da55e06ac9124366..257ac8ae32ffa9b9883e2f33b764aa0093f462f8 100644 (file)
@@ -9409,6 +9409,8 @@ leave it stopped or free to run as needed."),
   signal_print[GDB_SIGNAL_WAITING] = 0;
   signal_stop[GDB_SIGNAL_CANCEL] = 0;
   signal_print[GDB_SIGNAL_CANCEL] = 0;
+  signal_stop[GDB_SIGNAL_LIBRT] = 0;
+  signal_print[GDB_SIGNAL_LIBRT] = 0;
 
   /* Update cached state.  */
   signal_cache_update (-1);
index b291d317fe454b85d4486e4f7c8d542a72f9216b..daa6f5862f3989d2679df8e84f824ecebd953fcc 100644 (file)
@@ -1536,6 +1536,9 @@ static struct trans signal_table[] =
 #ifdef SIGAIO
   { SIGAIO, "SIGAIO", "Asynchronous I/O signal" },
 #endif
+#ifdef SIGLIBRT
+  { SIGLIBRT, "SIGLIBRT", "Used by librt" },
+#endif
 
   /* FIXME: add real-time signals.  */
 };
index f05ba4b628720caf4d39fd39404b3ddb76665e34..05f127e56326fbde64e20802cde008c6334d8219 100644 (file)
@@ -1,3 +1,7 @@
+2016-07-15  John Baldwin  <jhb@FreeBSD.org>
+
+       * signals.def: Add GDB_SIGNAL_LIBRT.
+
 2016-01-06  Mike Frysinger  <vapier@gentoo.org>
 
        * remote-sim.h (sim_open): Mark argv const.
index 61cc88c1cb0136e3d34a164388aee443c580e65f..2b30e71ec0145e507cfe1e8b57f6d7e530fe3cdc 100644 (file)
@@ -194,7 +194,9 @@ SET (GDB_EXC_EMULATION, 148, "EXC_EMULATION", "Emulation instruction")
 SET (GDB_EXC_SOFTWARE, 149, "EXC_SOFTWARE", "Software generated exception")
 SET (GDB_EXC_BREAKPOINT, 150, "EXC_BREAKPOINT", "Breakpoint")
 
+SET (GDB_SIGNAL_LIBRT, 151, "SIGLIBRT", "librt internal signal")
+
 /* If you are adding a new signal, add it just above this comment.  */
 
 /* Last and unused enum value, for sizing arrays, etc.  */
-SET (GDB_SIGNAL_LAST, 151, NULL, "GDB_SIGNAL_LAST")
+SET (GDB_SIGNAL_LAST, 152, NULL, "GDB_SIGNAL_LAST")