diff --git a/Userland/Utilities/strace.cpp b/Userland/Utilities/strace.cpp index 4e7e615617..bf8e71a43b 100644 --- a/Userland/Utilities/strace.cpp +++ b/Userland/Utilities/strace.cpp @@ -579,6 +579,15 @@ static void format_close(FormattedSyscallBuilder& builder, int fd) builder.add_arguments(fd); } +static ErrorOr format_pledge(FormattedSyscallBuilder& builder, Syscall::SC_pledge_params* params_p) +{ + auto params = TRY(copy_from_process(params_p)); + builder.add_arguments( + StringArgument { params.promises }, + StringArgument { params.execpromises }); + return {}; +} + static ErrorOr format_poll(FormattedSyscallBuilder& builder, Syscall::SC_poll_params* params_p) { // TODO: format fds and sigmask properly @@ -749,6 +758,9 @@ static ErrorOr format_syscall(FormattedSyscallBuilder& builder, Syscall::F case SC_open: TRY(format_open(builder, (Syscall::SC_open_params*)arg1)); break; + case SC_pledge: + TRY(format_pledge(builder, (Syscall::SC_pledge_params*)arg1)); + break; case SC_poll: TRY(format_poll(builder, (Syscall::SC_poll_params*)arg1)); break;