From: Ivo Raisr Date: Fri, 18 Aug 2017 14:53:57 +0000 (+0200) Subject: Recognize signal 151 (SIGLIBRT) sent by gdb. X-Git-Tag: VALGRIND_3_14_0~281 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad1c929a82279b166679b65b1dfe93b63f0bf8fb;p=thirdparty%2Fvalgrind.git Recognize signal 151 (SIGLIBRT) sent by gdb. 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. --- diff --git a/coregrind/m_gdbserver/gdb/signals.h b/coregrind/m_gdbserver/gdb/signals.h index c240f6b34b..1ad4a0acdf 100644 --- a/coregrind/m_gdbserver/gdb/signals.h +++ b/coregrind/m_gdbserver/gdb/signals.h @@ -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. */ diff --git a/coregrind/m_gdbserver/signals.c b/coregrind/m_gdbserver/signals.c index ff5bfafb7f..69103ec507 100644 --- a/coregrind/m_gdbserver/signals.c +++ b/coregrind/m_gdbserver/signals.c @@ -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)