]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add ptrace op PT_GET_SC_RET.
authorjhb <jhb@FreeBSD.org>
Mon, 15 Jul 2019 21:48:02 +0000 (21:48 +0000)
committerjhb <jhb@FreeBSD.org>
Mon, 15 Jul 2019 21:48:02 +0000 (21:48 +0000)
commitbd67f2ec6b6283a29cb2fda3577c28558458db72
treea0db97356f121a565695a1690ee9c34645004bbb
parenta1082599271443b6b3689cebb89ad364fb326d7e
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].

Reviewed by: kib
MFC after: 1 month
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D20901
lib/libc/sys/ptrace.2
sys/kern/sys_process.c
sys/sys/ptrace.h
tests/sys/kern/ptrace_test.c