Module Name: src
Committed By: kamil
Date: Sat Apr 8 00:56:38 UTC 2017
Modified Files:
src/lib/libc/sys: ptrace.2
Log Message:
Document new calls and be more clear about PT_SYSCALL* in ptrace(2)
Document PT_SETSTEP and PT_CLEARSTEP in ptrace(2).
Try to explain more details of PT_SYSCALL and PT_SYSCALLEMU.
The description of PT_*STEP has been obtained from FreeBSD.
Sponsored by <The NetBSD Foundation>
To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/lib/libc/sys/ptrace.2
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/sys/ptrace.2
diff -u src/lib/libc/sys/ptrace.2:1.64 src/lib/libc/sys/ptrace.2:1.65
--- src/lib/libc/sys/ptrace.2:1.64 Fri Apr 7 07:21:58 2017
+++ src/lib/libc/sys/ptrace.2 Sat Apr 8 00:56:38 2017
@@ -1,4 +1,4 @@
-.\" $NetBSD: ptrace.2,v 1.64 2017/04/07 07:21:58 pgoyette Exp $
+.\" $NetBSD: ptrace.2,v 1.65 2017/04/08 00:56:38 kamil Exp $
.\"
.\" This file is in the public domain.
.Dd April 7, 2017
@@ -404,9 +404,17 @@ argument should contain
.Dq Li "sizeof(struct ptrace_lwpinfo)" .
.It Dv PT_SYSCALL
Stops a process before and after executing each system call.
+Otherwise this operation is the same as
+.Dv PT_CONTINUE .
.It Dv PT_SYSCALLEMU
Intercept and ignore a system call before it has been executed, for use with
.Dv PT_SYSCALL .
+This operation shall be called for syscall entry trap from
+.Dv PT_STSCALL .
+To resume execution after intercepting the system call,
+another
+.Dv PT_SYSCALL
+shall be used.
.It Dv PT_SET_EVENT_MASK
This request can be used to specify which events in the traced process
should be reported to the tracing process.
@@ -626,6 +634,10 @@ If the
.Fa data
argument is less than zero, it contains the negative of the LWP ID of
the thread to be stepped, and only that thread executes.
+.It Dv PT_SETSTEP
+This request will turn on single stepping of the specified process.
+.It Dv PT_CLEARSTEP
+This request will turn off single stepping of the specified process.
.It Dv PT_GETREGS
This request reads the traced process' machine registers into the
.Dq Li "struct reg"