|
From: Ivo R. <ir...@so...> - 2017-08-21 14:24:56
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=ad1c929a82279b166679b65b1dfe93b63f0bf8fb commit ad1c929a82279b166679b65b1dfe93b63f0bf8fb Author: Ivo Raisr <iv...@iv...> Date: Fri Aug 18 16:53:57 2017 +0200 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: --- coregrind/m_gdbserver/gdb/signals.h | 2 ++ coregrind/m_gdbserver/signals.c | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/coregrind/m_gdbserver/gdb/signals.h b/coregrind/m_gdbserver/gdb/signals.h index c240f6b..1ad4a0a 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 ff5bfaf..69103ec 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) |