diff options
Diffstat (limited to 'source/Plugins/Process/NetBSD')
3 files changed, 11 insertions, 8 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()); } diff --git a/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h b/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h index e85ca3b7a925..4e7f0a1c13ab 100644 --- a/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h +++ b/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h @@ -9,12 +9,12 @@ #ifndef liblldb_NativeProcessNetBSD_H_ #define liblldb_NativeProcessNetBSD_H_ +#include "Plugins/Process/POSIX/NativeProcessELF.h" #include "lldb/Target/MemoryRegionInfo.h" #include "lldb/Utility/ArchSpec.h" #include "lldb/Utility/FileSpec.h" #include "NativeThreadNetBSD.h" -#include "lldb/Host/common/NativeProcessProtocol.h" namespace lldb_private { namespace process_netbsd { @@ -25,7 +25,7 @@ namespace process_netbsd { /// for debugging. /// /// Changes in the inferior process state are broadcasted. -class NativeProcessNetBSD : public NativeProcessProtocol { +class NativeProcessNetBSD : public NativeProcessELF { public: class Factory : public NativeProcessProtocol::Factory { public: diff --git a/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp b/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp index a7cd637bf826..6cc2810fa235 100644 --- a/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp +++ b/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp @@ -906,8 +906,8 @@ uint32_t NativeRegisterContextNetBSD_x86_64::SetHardwareWatchpoint( return wp_index; } if (error.Fail() && log) { - log->Printf("NativeRegisterContextNetBSD_x86_64::%s Error: %s", - __FUNCTION__, error.AsCString()); + LLDB_LOGF(log, "NativeRegisterContextNetBSD_x86_64::%s Error: %s", + __FUNCTION__, error.AsCString()); } } return LLDB_INVALID_INDEX32; |