Document TRAP_SCE and TRAP_SCX in siginfo(2)

This commit is contained in:
kamil 2019-05-25 05:11:14 +00:00
parent c6b8a0a474
commit 1fa976076c
1 changed files with 59 additions and 15 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: siginfo.2,v 1.22 2017/02/17 01:14:31 kamil Exp $
.\" $NetBSD: siginfo.2,v 1.23 2019/05/25 05:11:14 kamil Exp $
.\"
.\" Copyright (c) 2003 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd January 14, 2017
.Dd May 25, 2019
.Dt SIGINFO 2
.Os
.Sh NAME
@ -237,6 +237,10 @@ Process hardware debug register trap
Process exec trap
.It TRAP_LWP
Process LWP trap
.It TRAP_SCE
Process syscall entry trap
.It TRAP_SCX
Process syscall exit trap
.It TRAP_TRACE
Process trace trap
.El
@ -273,9 +277,11 @@ High priority input available
.El
.Pp
For
.Dv SIGILL , SIGFPE ,
.Dv SIGILL ,
.Dv SIGFPE ,
.Dv SIGBUS
and
.Dv SIGTRAP
.Dv SIGSEGV
the
.Nm
structure contains the following additional members:
@ -285,14 +291,17 @@ int si_trap;
.Ed
.Pp
.Fa si_addr
contains the address of the faulting instruction and
contains the address of the faulting instruction or data and
.Fa si_trap
contains a hardware specific reason.
.Pp
For
.Dv SIGBUS
.Dv SIGTRAP
and
.Dv SIGSEGV
.Dv TRAP_BRKPT ,
.Dv TRAP_TRACE
or
.Dv TRAP_DBREG
the
.Nm
structure contains the following additional members:
@ -306,10 +315,34 @@ contains the address of the faulting data and
.Fa si_trap
contains a hardware specific reason.
.Pp
For some architectures
the value of
.Fa si_addr
may be inaccurate.
For
.Dv SIGTRAP
and
.Dv TRAP_SCE
or
.Dv TRAP_SCX
the
.Nm
structure contains the following additional members:
.Bd -literal -offset indent
int si_sysnum;
int si_retval[2];
int si_error;
uint64_t si_args[8];
.Ed
.Pp
.Fa si_sysnum
contains the syscall number,
.Fa si_retval
contains the syscall return value (meaningful for
.Dv TRAP_SCX
only),
.Fa si_error
contains the syscall error value (meaningful for
.Dv TRAP_SCX
only) and
.Fa si_args[8]
contains the syscall arguments,
.Pp
For
.Dv SIGIO
@ -374,9 +407,11 @@ extensions.
The
.Dv TRAP_CHLD ,
.Dv TRAP_DBREG ,
.Dv TRAP_EXEC
.Dv TRAP_EXEC ,
.Dv TRAP_LWP ,
.Dv TRAP_SCE
and
.Dv TRAP_LWP
.Dv TRAP_SCX
signal specific reasons of
.Dv SIGTRAP
are
@ -390,9 +425,18 @@ functionality first appeared in
.Pp
.Dv TRAP_CHLD ,
.Dv TRAP_DBREG ,
.Dv TRAP_EXEC
.Dv TRAP_EXEC ,
.Dv TRAP_LWP ,
.Dv TRAP_SCE
and
.Dv TRAP_LWP
.Dv TRAP_SCX
first appeared
in
.Nx 8 .
.Pp
The additional parameters with syscall information in
.Dv TRAP_SCE
and
.Dv TRAP_SCX
first appeared in
.Nx 9 .