]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
ptrace.2: Document PTRACE_GET_SYSCALL_INFO
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 2 Sep 2019 12:38:58 +0000 (15:38 +0300)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Tue, 10 Sep 2019 10:45:14 +0000 (12:45 +0200)
PTRACE_GET_SYSCALL_INFO request was introduced by Linux kernel
commit 201766a20e30f982ccfe36bebfad9602c3ff574a aka
v5.3-rc1~65^2~23.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/ptrace.2

index 8b8daf2389c8abe28e16777da0be433ff4446fe7..3b774f87bf324b507f85c954ba52c8afd369142b 100644 (file)
@@ -1005,6 +1005,27 @@ of the
 .IR "struct user_desc"
 is ignored; in other words,
 this ptrace operation can't be used to allocate a free TLS entry.)
+.TP
+.BR PTRACE_GET_SYSCALL_INFO " (since Linux 5.3)"
+.\" commit 201766a20e30f982ccfe36bebfad9602c3ff574a
+Retrieve information about the syscall that caused the stop.
+The information is placed into the buffer pointed by
+.I data
+argument, which should be a pointer to a buffer of type
+.IR "struct ptrace_syscall_info" .
+The
+.I addr
+argument contains the size of the buffer pointed to
+by
+.I data
+argument (i.e.,
+.IR "sizeof(struct ptrace_syscall_info)" ).
+The return value contains the number of bytes available
+to be written by the kernel.
+If the size of data to be written by the kernel exceeds the size
+specified by
+.I addr
+argument, the output is truncated.
 .\"
 .SS Death under ptrace
 When a (possibly multithreaded) process receives a killing signal