Skip to content

Commit 47667ee

Browse files
committed
[lldb] Update NativeProcess*BSD to new Status API
1 parent d48b0f8 commit 47667ee

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ static Status EnsureFDFlags(int fd, int flags) {
3636

3737
int status = fcntl(fd, F_GETFL);
3838
if (status == -1) {
39-
error.SetErrorToErrno();
39+
error = Status::FromErrno();
4040
return error;
4141
}
4242

4343
if (fcntl(fd, F_SETFL, status | flags) == -1) {
44-
error.SetErrorToErrno();
44+
error = Status::FromErrno();
4545
return error;
4646
}
4747

@@ -414,7 +414,7 @@ Status NativeProcessFreeBSD::PtraceWrapper(int req, lldb::pid_t pid, void *addr,
414414
if (ret == -1) {
415415
error = CanTrace();
416416
if (error.Success())
417-
error.SetErrorToErrno();
417+
error = Status::FromErrno();
418418
}
419419

420420
if (result)
@@ -523,7 +523,7 @@ Status NativeProcessFreeBSD::Halt() {
523523
if (StateIsStoppedState(m_state, false))
524524
return error;
525525
if (kill(GetID(), SIGSTOP) != 0)
526-
error.SetErrorToErrno();
526+
error = Status::FromErrno();
527527
return error;
528528
}
529529

@@ -544,7 +544,7 @@ Status NativeProcessFreeBSD::Signal(int signo) {
544544
Status error;
545545

546546
if (kill(GetID(), signo))
547-
error.SetErrorToErrno();
547+
error = Status::FromErrno();
548548

549549
return error;
550550
}

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ static Status EnsureFDFlags(int fd, int flags) {
4141

4242
int status = fcntl(fd, F_GETFL);
4343
if (status == -1) {
44-
error.SetErrorToErrno();
44+
error = Status::FromErrno();
4545
return error;
4646
}
4747

4848
if (fcntl(fd, F_SETFL, status | flags) == -1) {
49-
error.SetErrorToErrno();
49+
error = Status::FromErrno();
5050
return error;
5151
}
5252

@@ -391,7 +391,7 @@ Status NativeProcessNetBSD::StopProcess(lldb::pid_t pid) {
391391
ret = kill(pid, SIGSTOP);
392392

393393
if (ret == -1)
394-
error.SetErrorToErrno();
394+
error = Status::FromErrno();
395395

396396
LLDB_LOG(log, "kill({0}, SIGSTOP)", pid);
397397

@@ -412,7 +412,7 @@ Status NativeProcessNetBSD::PtraceWrapper(int req, lldb::pid_t pid, void *addr,
412412
ret = ptrace(req, static_cast<::pid_t>(pid), addr, data);
413413

414414
if (ret == -1)
415-
error.SetErrorToErrno();
415+
error = Status::FromErrno();
416416

417417
if (result)
418418
*result = ret;
@@ -576,7 +576,7 @@ Status NativeProcessNetBSD::Signal(int signo) {
576576
Status error;
577577

578578
if (kill(GetID(), signo))
579-
error.SetErrorToErrno();
579+
error = Status::FromErrno();
580580

581581
return error;
582582
}
@@ -612,7 +612,7 @@ Status NativeProcessNetBSD::Kill() {
612612
}
613613

614614
if (kill(GetID(), SIGKILL) != 0) {
615-
error.SetErrorToErrno();
615+
error = Status::FromErrno();
616616
return error;
617617
}
618618

0 commit comments

Comments
 (0)