aboutsummaryrefslogtreecommitdiffstats
path: root/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp')
-rw-r--r--source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp b/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
index 32d20d2b1215..8b6f9fbc33c3 100644
--- a/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
+++ b/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
@@ -140,7 +140,7 @@ NativeProcessNetBSD::NativeProcessNetBSD(::pid_t pid, int terminal_fd,
NativeDelegate &delegate,
const ArchSpec &arch,
MainLoop &mainloop)
- : NativeProcessProtocol(pid, terminal_fd, delegate), m_arch(arch) {
+ : NativeProcessELF(pid, terminal_fd, delegate), m_arch(arch) {
if (m_terminal_fd != -1) {
Status status = EnsureFDFlags(m_terminal_fd, O_NONBLOCK);
assert(status.Success());
@@ -195,6 +195,7 @@ void NativeProcessNetBSD::MonitorSIGSTOP(lldb::pid_t pid) {
SIGSTOP, &info.psi_siginfo);
}
}
+ SetState(StateType::eStateStopped, true);
}
}
@@ -339,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)
@@ -355,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)
@@ -658,7 +661,7 @@ NativeThreadNetBSD &NativeProcessNetBSD::AddThread(lldb::tid_t thread_id) {
if (m_threads.empty())
SetCurrentThreadID(thread_id);
- m_threads.push_back(llvm::make_unique<NativeThreadNetBSD>(*this, thread_id));
+ m_threads.push_back(std::make_unique<NativeThreadNetBSD>(*this, thread_id));
return static_cast<NativeThreadNetBSD &>(*m_threads.back());
}