Date: Mon, 25 Nov 2019 13:01:02 -0600 From: Kyle Evans <kevans@freebsd.org> To: John Baldwin <jhb@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>, svn-src-head <svn-src-head@freebsd.org> Subject: Re: svn commit: r350017 - in head: lib/libc/sys sys/kern sys/sys tests/sys/kern Message-ID: <CACNAnaGXqFo2Q1yFqYWk_pet0jYS6g11wSoOvCMT%2BEy7phP7eA@mail.gmail.com> In-Reply-To: <201907152148.x6FLm3EL068478@repo.freebsd.org> References: <201907152148.x6FLm3EL068478@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jul 15, 2019 at 4:48 PM John Baldwin <jhb@freebsd.org> wrote: > > Author: jhb > Date: Mon Jul 15 21:48:02 2019 > New Revision: 350017 > URL: https://svnweb.freebsd.org/changeset/base/350017 > > Log: > 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 > > Modified: > head/lib/libc/sys/ptrace.2 > head/sys/kern/sys_process.c > head/sys/sys/ptrace.h > head/tests/sys/kern/ptrace_test.c > Hey John, Any objection to MFC'ing this to stable/12 at least? I've found this to be almost-required in the ptrace user I've been working on lately... I certainly ripped out plenty of hair before realizing that it wasn't detecting error returns properly. Thanks, Kyle Evans
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaGXqFo2Q1yFqYWk_pet0jYS6g11wSoOvCMT%2BEy7phP7eA>