From 911a6dcaa980034659498af658cb1c1884055d0e Mon Sep 17 00:00:00 2001 From: Chaoren Lin Date: Tue, 3 Feb 2015 01:51:02 +0000 Subject: [PATCH] LLGS local - signal stops inferior in debugger MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit NativeProcessLinux::MonitorSignal was automatically resuming threads that stopped due to a signal.  This is inconsistent with the behavior of lldb and gdb.  This change removes the automatic resume. Fixes TestSendSignal.py TestSignalsAPI.py if PLATFORM_LINUX_FORCE_LLGS_LOCAL is in the environment vars. llvm-svn: 227918 --- .../Plugins/Process/Linux/NativeProcessLinux.cpp | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp index 2a1690e..1c9a276 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -2578,6 +2578,7 @@ NativeProcessLinux::MonitorSignal(const siginfo_t *info, lldb::pid_t pid, bool e case SIGILL: case SIGFPE: case SIGBUS: + default: { // This thread is stopped. NotifyThreadStop (pid); @@ -2646,26 +2647,6 @@ NativeProcessLinux::MonitorSignal(const siginfo_t *info, lldb::pid_t pid, bool e SetCurrentThreadID (signaling_tid); SetState (StateType::eStateStopped, true); }); - break; - } - - default: - { - // This thread is stopped. - NotifyThreadStop (pid); - - if (log) - log->Printf ("NativeProcessLinux::%s pid = %" PRIu64 " tid %" PRIu64 " resuming thread with signal %s (%d)", __FUNCTION__, GetID (), pid, GetUnixSignals().GetSignalAsCString (signo), signo); - - // Pass the signal on to the inferior. - m_coordinator_up->RequestThreadResume (pid, - [=](lldb::tid_t tid_to_resume) - { - reinterpret_cast (thread_sp.get ())->SetRunning (); - // Pass this signal number on to the inferior to handle. - Resume (tid_to_resume, signo); - }, - CoordinatorErrorHandler); } break; } -- 2.7.4