]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC 350017: Add ptrace op PT_GET_SC_RET.
authorJohn Baldwin <jhb@FreeBSD.org>
Tue, 28 Apr 2020 15:44:39 +0000 (15:44 +0000)
committerJohn Baldwin <jhb@FreeBSD.org>
Tue, 28 Apr 2020 15:44:39 +0000 (15:44 +0000)
commit179706b80d4dae216fea76890dc8c76d58ec478a
tree7975fbcf380b811d7b2b207fe91ed2b1218fbeda
parentff9151463f1213e17b09fa50335c7b7a4de166f3
MFC 350017: Add ptrace op PT_GET_SC_RET.

This ptrace operation returns a structure containing the error and
return values from the current system call.  It is only valid when a
thread is stopped during a system call exit (PL_FLAG_SCX is set).

The sr_error member holds the error value from the system call.  Note
that this error value is the native FreeBSD error value that has _not_
been translated to an ABI-specific error value similar to the values
logged to ktrace.

If sr_error is zero, then the return values of the system call will be
set in sr_retval[0] and sr_retval[1].
lib/libc/sys/ptrace.2
sys/kern/sys_process.c
sys/sys/ptrace.h
tests/sys/kern/ptrace_test.c