Skip to content

Commit

Permalink
[lldb] [Process/NetBSD] Use PT_STOP to stop the process [NFCI]
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D70060
  • Loading branch information
mgorny committed Nov 12, 2019
1 parent 636412b commit 77cc246
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,12 +381,7 @@ Status NativeProcessNetBSD::Resume(const ResumeActionList &resume_actions) {
}

Status NativeProcessNetBSD::Halt() {
Status error;

if (kill(GetID(), SIGSTOP) != 0)
error.SetErrorToErrno();

return error;
return PtraceWrapper(PT_STOP, GetID());
}

Status NativeProcessNetBSD::Detach() {
Expand All @@ -411,6 +406,10 @@ Status NativeProcessNetBSD::Signal(int signo) {
return error;
}

Status NativeProcessNetBSD::Interrupt() {
return PtraceWrapper(PT_STOP, GetID());
}

Status NativeProcessNetBSD::Kill() {
Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
LLDB_LOG(log, "pid {0}", GetID());
Expand Down
2 changes: 2 additions & 0 deletions lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ class NativeProcessNetBSD : public NativeProcessELF {

Status Signal(int signo) override;

Status Interrupt() override;

Status Kill() override;

Status GetMemoryRegionInfo(lldb::addr_t load_addr,
Expand Down

0 comments on commit 77cc246

Please sign in to comment.