The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f967dd04c880e9c9c68cd20de135d77b3ca1c26d
commit f967dd04c880e9c9c68cd20de135d77b3ca1c26d Author: Konstantin Belousov <[email protected]> AuthorDate: 2026-07-15 13:42:44 +0000 Commit: Konstantin Belousov <[email protected]> CommitDate: 2026-07-16 22:22:55 +0000 ptrace.2: Document PT_SET_SC_RET Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D58247 --- lib/libsys/ptrace.2 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/libsys/ptrace.2 b/lib/libsys/ptrace.2 index a6798bb22b27..e1739a56e115 100644 --- a/lib/libsys/ptrace.2 +++ b/lib/libsys/ptrace.2 @@ -851,6 +851,26 @@ and .Xr sigreturn 2 .Pc . .El +.It Dv PT_SET_SC_RET +Set the current system call return values. +This request is only valid for threads stopped in a syscall +entry (the +.Dv PL_FLAG_SCE +state). +The +.Fa addr +argument specifies a pointer to a +.Vt "struct ptrace_sc_ret" , +the +.Fa data +argument is set to the size of the structure. +.Pp +The current system call handler is not executed. +After the thread is resumed, it returns to userspace with machine state +set as though the system call handler had returned the values passed via +the content of the +.Vt "struct ptrace_sc_ret" +argument. .It Dv PT_FOLLOW_FORK This request controls tracing for new child processes of a traced process. If
