summaryrefslogtreecommitdiff
path: root/usr/src/man/man3c/ptrace.3c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/man/man3c/ptrace.3c')
-rw-r--r--usr/src/man/man3c/ptrace.3c37
1 files changed, 7 insertions, 30 deletions
diff --git a/usr/src/man/man3c/ptrace.3c b/usr/src/man/man3c/ptrace.3c
index 30a5ca51ef..9d7a6fef95 100644
--- a/usr/src/man/man3c/ptrace.3c
+++ b/usr/src/man/man3c/ptrace.3c
@@ -3,7 +3,7 @@
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH ptrace 3C "22 Mar 2004" "SunOS 5.11" "Standard C Library Functions"
+.TH PTRACE 3C "Mar 22, 2004"
.SH NAME
ptrace \- allows a parent process to control the execution of a child process
.SH SYNOPSIS
@@ -32,12 +32,10 @@ The \fIrequest\fR argument determines the action to be taken by \fBptrace()\fR
and is one of the following:
.sp
.ne 2
-.mk
.na
\fB\fB0\fR\fR
.ad
.RS 5n
-.rt
This request must be issued by the child process if it is to be traced by its
parent. It turns on the child's trace flag that stipulates that the child
should be left in a stopped state on receipt of a signal rather than the state
@@ -54,12 +52,10 @@ The remainder of the requests can only be used by the parent process. For each,
state before these requests are made.
.sp
.ne 2
-.mk
.na
\fB\fB1, 2\fR\fR
.ad
.RS 8n
-.rt
With these requests, the word at location \fIaddr\fR in the address space of
the child is returned to the parent process. If instruction and data space are
separated, request \fB1\fR returns a word from instruction space, and request
@@ -73,12 +69,10 @@ returned to the parent process and the parent's \fBerrno\fR is set to
.sp
.ne 2
-.mk
.na
\fB\fB3\fR\fR
.ad
.RS 8n
-.rt
With this request, the word at location \fIaddr\fR in the child's user area in
the system's address space (see <\fBsys/user.h\fR>) is returned to the parent
process. The \fIdata\fR argument is ignored. This request fails if \fIaddr\fR
@@ -89,12 +83,10 @@ set to \fBEIO\fR.
.sp
.ne 2
-.mk
.na
\fB\fB4, 5\fR\fR
.ad
.RS 8n
-.rt
With these requests, the value given by the \fIdata\fR argument is written into
the address space of the child at location \fIaddr\fR. If instruction and data
space are separated, request \fB4\fR writes a word into instruction space, and
@@ -108,12 +100,10 @@ process and the parent's \fBerrno\fR is set to \fBEIO\fR.
.sp
.ne 2
-.mk
.na
\fB\fB6\fR\fR
.ad
.RS 8n
-.rt
With this request, a few entries in the child's user area can be written.
\fIdata\fR gives the value that is to be written and \fIaddr\fR is the location
of the entry. The few entries that can be written are the general registers and
@@ -122,12 +112,10 @@ the condition codes of the Processor Status Word.
.sp
.ne 2
-.mk
.na
\fB\fB7\fR\fR
.ad
.RS 8n
-.rt
This request causes the child to resume execution. If the \fIdata\fR argument
is 0, all pending signals including the one that caused the child to stop are
canceled before it resumes execution. If the \fIdata\fR argument is a valid
@@ -141,24 +129,20 @@ parent's \fBerrno\fR is set to \fBEIO\fR.
.sp
.ne 2
-.mk
.na
\fB\fB8\fR\fR
.ad
.RS 8n
-.rt
This request causes the child to terminate with the same consequences as
\fBexit\fR(2).
.RE
.sp
.ne 2
-.mk
.na
\fB\fB9\fR\fR
.ad
.RS 8n
-.rt
This request sets the trace bit in the Processor Status Word of the child and
then executes the same steps as listed above for request \fB7\fR. The trace bit
causes an interrupt on completion of one machine instruction. This effectively
@@ -178,35 +162,29 @@ before executing the first instruction of the new image showing signal
The \fBptrace()\fR function will fail if:
.sp
.ne 2
-.mk
.na
\fB\fBEIO\fR\fR
.ad
.RS 9n
-.rt
The \fIrequest\fR argument is an illegal number.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBEPERM\fR\fR
.ad
.RS 9n
-.rt
The calling process does not have appropriate privileges to control the calling
process. See \fBproc\fR(4).
.RE
.sp
.ne 2
-.mk
.na
\fB\fBESRCH\fR\fR
.ad
.RS 9n
-.rt
The \fIpid\fR argument identifies a child that does not exist or has not
executed a \fBptrace()\fR call with request \fB0\fR.
.RE
@@ -231,15 +209,14 @@ See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.TS
-tab() box;
-cw(2.75i) |cw(2.75i)
-lw(2.75i) |lw(2.75i)
-.
-ATTRIBUTE TYPEATTRIBUTE VALUE
+box;
+c | c
+l | l .
+ATTRIBUTE TYPE ATTRIBUTE VALUE
_
-Interface StabilityStandard
+Interface Stability Standard
_
-MT-LevelMT-Safe
+MT-Level MT-Safe
.TE
.SH SEE ALSO