From a292a4943b675545b1a1009eb6611f18dc3d4e78 Mon Sep 17 00:00:00 2001 From: Michal Gorny Date: Tue, 24 Sep 2019 13:41:54 +0000 Subject: [lldb] [Process/NetBSD] Fix handling LLDB_INVALID_SIGNAL_NUMBER Fix NativeProcessNetBSD::Resume() to handle LLDB_INVALID_SIGNAL_NUMBER correctly. Fixes breakage caused by r372090 and r372300. I have major rewrite of that function pending; however, the fixes to gdb-remote were committed prior to that. llvm-svn: 372755 --- lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp') diff --git a/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp b/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp index 87feca3c433..8b6f9fbc33c 100644 --- a/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp +++ b/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp @@ -340,12 +340,14 @@ Status NativeProcessNetBSD::Resume(const ResumeActionList &resume_actions) { } Status error; + int signal = + action->signal != LLDB_INVALID_SIGNAL_NUMBER ? action->signal : 0; switch (action->state) { case eStateRunning: { // Run the thread, possibly feeding it the signal. error = NativeProcessNetBSD::PtraceWrapper(PT_CONTINUE, GetID(), (void *)1, - action->signal); + signal); if (!error.Success()) return error; for (const auto &thread : m_threads) @@ -356,7 +358,7 @@ Status NativeProcessNetBSD::Resume(const ResumeActionList &resume_actions) { case eStateStepping: // Run the thread, possibly feeding it the signal. error = NativeProcessNetBSD::PtraceWrapper(PT_STEP, GetID(), (void *)1, - action->signal); + signal); if (!error.Success()) return error; for (const auto &thread : m_threads) -- cgit v1.2.3