]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Recognize signal 151 (SIGLIBRT) sent by gdb.
authorIvo Raisr <ivosh@ivosh.net>
Fri, 18 Aug 2017 14:53:57 +0000 (16:53 +0200)
committerIvo Raisr <ivosh@ivosh.net>
Mon, 21 Aug 2017 14:24:00 +0000 (16:24 +0200)
It has been observed that gdb on Solaris sends this signal to
child processes. Unfortunately array "pass_signals" was too small
to accomodate this signal and subsequently VG_(clo_vex_control).iropt_verbosity
was overwritten.
This has been fixed now.

coregrind/m_gdbserver/gdb/signals.h
coregrind/m_gdbserver/signals.c

index c240f6b34b30a938ca9959a33c697f5d9c5fb6c4..1ad4a0acdfe1115682ad45d93b21356d0abf7836 100644 (file)
@@ -229,6 +229,8 @@ enum target_signal
     TARGET_EXC_SOFTWARE,
     TARGET_EXC_BREAKPOINT,
 
+    TARGET_SIGNAL_LIBRT,
+
     /* If you are adding a new signal, add it just above this comment.  */
 
     /* Last and unused enum value, for sizing arrays, etc.  */
index ff5bfafb7fef5defb34e852e8539f7a49a84fc4f..69103ec5075b969ac8789a2b291e26dab0471a5d 100644 (file)
@@ -197,6 +197,8 @@ static struct {
       {"EXC_SOFTWARE", "Software generated exception"},
       {"EXC_BREAKPOINT", "Breakpoint"},
 
+      {"SIGLIBRT", "librt internal signal"},
+
       /* Last entry, used to check whether the table is the right size.  */
       {NULL, "TARGET_SIGNAL_MAGIC"}
    };
@@ -465,6 +467,10 @@ enum target_signal target_signal_from_host (int hostsig)
    if (hostsig == VKI_SIGINFO)
       return TARGET_SIGNAL_INFO;
 #endif
+#if defined (VKI_SIGLIBRT)
+   if (hostsig == VKI_SIGLIBRT)
+      return TARGET_SIGNAL_LIBRT;
+#endif
 
 #if defined (VKI_SIGRTMIN)
    if (hostsig >= VKI_SIGRTMIN && hostsig < VKI_SIGRTMAX) {
@@ -714,6 +720,10 @@ int do_target_signal_to_host (enum target_signal oursig,
    case TARGET_SIGNAL_INFO:
       return VKI_SIGINFO;
 #endif
+#if defined (SIGLIBRT)
+   case TARGET_SIGNAL_LIBRT:
+      return SIGLIBRT;
+#endif
 
    default:
 #if defined (VKI_SIGRTMIN)