Skip to content

Commit

Permalink
[lldb] Update NativeProcessLinux to new Status API
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-prantl committed Aug 27, 2024
1 parent 5f2389d commit 67eb727
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@ static Status EnsureFDFlags(int fd, int flags) {

int status = fcntl(fd, F_GETFL);
if (status == -1) {
error.SetErrorToErrno();
error = Status::FromErrno();
return error;
}

if (fcntl(fd, F_SETFL, status | flags) == -1) {
error.SetErrorToErrno();
error = Status::FromErrno();
return error;
}

Expand Down Expand Up @@ -1078,7 +1078,7 @@ Status NativeProcessLinux::Halt() {
Status error;

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

return error;
}
Expand Down Expand Up @@ -1114,7 +1114,7 @@ Status NativeProcessLinux::Signal(int signo) {
Host::GetSignalAsCString(signo), GetID());

if (kill(GetID(), signo))
error.SetErrorToErrno();
error = Status::FromErrno();

return error;
}
Expand Down Expand Up @@ -1191,7 +1191,7 @@ Status NativeProcessLinux::Kill() {
}

if (kill(GetID(), SIGKILL) != 0) {
error.SetErrorToErrno();
error = Status::FromErrno();
return error;
}

Expand Down Expand Up @@ -2006,7 +2006,7 @@ Status NativeProcessLinux::PtraceWrapper(int req, lldb::pid_t pid, void *addr,
addr, data);

if (ret == -1)
error.SetErrorToErrno();
error = Status::FromErrno();

if (result)
*result = ret;
Expand Down

0 comments on commit 67eb727

Please sign in to comment.