Skip to content
Permalink
Browse files

[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
  • Loading branch information...
mgorny committed Sep 24, 2019
1 parent 1b10386 commit a292a4943b675545b1a1009eb6611f18dc3d4e78
Showing with 4 additions and 2 deletions.
  1. +4 −2 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)

0 comments on commit a292a49

Please sign in to comment.
You can’t perform that action at this time.