Author: mgorny Date: Tue Sep 24 06:41:54 2019 New Revision: 372755 URL: http://llvm.org/viewvc/llvm-project?rev=372755&view=rev Log: [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. Modified: lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp Modified: lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp?rev=372755&r1=372754&r2=372755&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp (original) +++ lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp Tue Sep 24 06:41:54 2019 @@ -340,12 +340,14 @@ Status NativeProcessNetBSD::Resume(const } 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 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) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits