Skip to content

Commit 77cc246

Browse files
committed
[lldb] [Process/NetBSD] Use PT_STOP to stop the process [NFCI]
Differential Revision: https://reviews.llvm.org/D70060
1 parent 636412b commit 77cc246

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,12 +381,7 @@ Status NativeProcessNetBSD::Resume(const ResumeActionList &resume_actions) {
381381
}
382382

383383
Status NativeProcessNetBSD::Halt() {
384-
Status error;
385-
386-
if (kill(GetID(), SIGSTOP) != 0)
387-
error.SetErrorToErrno();
388-
389-
return error;
384+
return PtraceWrapper(PT_STOP, GetID());
390385
}
391386

392387
Status NativeProcessNetBSD::Detach() {
@@ -411,6 +406,10 @@ Status NativeProcessNetBSD::Signal(int signo) {
411406
return error;
412407
}
413408

409+
Status NativeProcessNetBSD::Interrupt() {
410+
return PtraceWrapper(PT_STOP, GetID());
411+
}
412+
414413
Status NativeProcessNetBSD::Kill() {
415414
Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
416415
LLDB_LOG(log, "pid {0}", GetID());

lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ class NativeProcessNetBSD : public NativeProcessELF {
4747

4848
Status Signal(int signo) override;
4949

50+
Status Interrupt() override;
51+
5052
Status Kill() override;
5153

5254
Status GetMemoryRegionInfo(lldb::addr_t load_addr,

0 commit comments

Comments
 (0)