summaryrefslogtreecommitdiff
path: root/lib/libc/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-03-09 22:46:27 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-03-09 22:46:27 +0000
commitf7757a684a6ab4bbb0a864b2c80ea3976b6c4ad7 (patch)
treeb9e88c7ae50e25099e08e6f20b2cfb1efaeb9266 /lib/libc/sys
parentc5341889bbdfe65b8026f18d2d1ec852f9deda25 (diff)
A better description of the machine-dependent PT commands.
Diffstat (limited to 'lib/libc/sys')
-rw-r--r--lib/libc/sys/ptrace.260
1 files changed, 40 insertions, 20 deletions
diff --git a/lib/libc/sys/ptrace.2 b/lib/libc/sys/ptrace.2
index 7fc5a98de91..eeade9e1522 100644
--- a/lib/libc/sys/ptrace.2
+++ b/lib/libc/sys/ptrace.2
@@ -1,8 +1,8 @@
-.\" $OpenBSD: ptrace.2,v 1.12 2003/02/27 07:55:34 jmc Exp $
+.\" $OpenBSD: ptrace.2,v 1.13 2004/03/09 22:46:26 miod Exp $
.\" $NetBSD: ptrace.2,v 1.3 1996/02/23 01:39:41 jtc Exp $
.\"
.\" This file is in the public domain.
-.Dd November 7, 1994
+.Dd March 2, 2004
.Dt PTRACE 2
.Os
.Sh NAME
@@ -231,7 +231,9 @@ and set
.El
.Pp
Additionally, machine-specific requests can exist.
-On the SPARC, these are:
+All
+.Ox
+platforms support the following requests:
.Bl -tag -width 12n
.It Dv PT_GETREGS
This request reads the traced process' machine registers into the
@@ -249,23 +251,6 @@ it loads the traced process' machine registers from the
.Aq Pa machine/reg.h )
pointed to by
.Fa addr .
-.It Dv PT_GETFPREGS
-This request reads the traced process' floating-point registers into
-the
-.Dq Li "struct fpreg"
-(defined in
-.Aq Pa machine/reg.h )
-pointed to by
-.Fa addr .
-.It Dv PT_SETFPREGS
-This request is the converse of
-.Dv PT_GETFPREGS ;
-it loads the traced process' floating-point registers from the
-.Dq Li "struct fpreg"
-(defined in
-.Aq Pa machine/reg.h )
-pointed to by
-.Fa addr .
.\" .It Dv PT_SYSCALL
.\" This request is like
.\" .Dv PT_CONTINUE
@@ -362,6 +347,41 @@ pointed to by
.\" syscall and will be passed back to the traced process by the normal
.\" syscall return mechanism.
.El
+.Pp
+In addition, all platforms but vax support these additional requests:
+.Bl -tag -width 12n
+.It Dv PT_GETFPREGS
+This request reads the traced process' floating-point registers into
+the
+.Dq Li "struct fpreg"
+(defined in
+.Aq Pa machine/reg.h )
+pointed to by
+.Fa addr .
+.It Dv PT_SETFPREGS
+This request is the converse of
+.Dv PT_GETFPREGS ;
+it loads the traced process' floating-point registers from the
+.Dq Li "struct fpreg"
+(defined in
+.Aq Pa machine/reg.h )
+pointed to by
+.Fa addr .
+.El
+.Pp
+Finally, the following request is available on sparc:
+.Bl -tag -width 12n
+.It Dv PT_WCOOKIE
+This request reads the traced process'
+.Sq window cookie
+into the
+.Li int
+pointed to by
+.Fa addr .
+The window cookie needs to be
+.Sq XOR'ed
+to stack-saved program counters.
+.El
.Sh ERRORS
Some requests can cause
.Fn ptrace