From 929c1cc1fea85a6f5300b950856bf86229871a7b Mon Sep 17 00:00:00 2001 From: kamil Date: Sat, 7 Jan 2017 01:29:18 +0000 Subject: [PATCH] ptrace(2): Document addr and data argument usage for PT_GET_PROCESS_STATE The PT_GET_PROCESS_STATE call in ptrace(2) has the following usage of addr and data: A pointer to this structure is passed in addr. The data argument should be set to sizeof(struct ptrace_event). Sponsored by --- lib/libc/sys/ptrace.2 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/libc/sys/ptrace.2 b/lib/libc/sys/ptrace.2 index d4977f8b5ff3..d9fd396c6cf6 100644 --- a/lib/libc/sys/ptrace.2 +++ b/lib/libc/sys/ptrace.2 @@ -1,7 +1,7 @@ -.\" $NetBSD: ptrace.2,v 1.46 2016/12/29 22:17:51 kamil Exp $ +.\" $NetBSD: ptrace.2,v 1.47 2017/01/07 01:29:18 kamil Exp $ .\" .\" This file is in the public domain. -.Dd November 1, 2016 +.Dd January 7, 2016 .Dt PTRACE 2 .Os .Sh NAME @@ -309,7 +309,7 @@ pointed to by The .Fa data argument should be set to -.Li sizeof(struct ptrace_event) . +.Li sizeof(struct ptrace_state) . .It Dv PT_GET_PROCESS_STATE This request reads the state information associated with the event that stopped the traced process. @@ -322,6 +322,13 @@ typedef struct ptrace_state { pid_t pe_other_pid; } ptrace_state_t; .Ed +.Pp +A pointer to this structure is passed in +.Fa addr . +The +.Fa data +argument should be set to +.Li sizeof(struct ptrace_event) . .El .Pp Additionally, the following requests exist but are