Deleted Added
full compact
ptrace.2 (108028) ptrace.2 (108087)
1.\" $FreeBSD: head/lib/libc/sys/ptrace.2 108028 2002-12-18 09:22:32Z ru $
1.\" $FreeBSD: head/lib/libc/sys/ptrace.2 108087 2002-12-19 09:40:28Z ru $
2.\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $
3.\"
4.\" This file is in the public domain.
5.Dd January 20, 1996
6.Dt PTRACE 2
7.Os
8.Sh NAME
9.Nm ptrace

--- 38 unchanged lines hidden (view full) ---

48.Fa request
49argument specifies what operation is being performed; the meaning of
50the rest of the arguments depends on the operation, but except for one
51special case noted below, all
52.Fn ptrace
53calls are made by the tracing process, and the
54.Fa pid
55argument specifies the process ID of the traced process.
2.\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $
3.\"
4.\" This file is in the public domain.
5.Dd January 20, 1996
6.Dt PTRACE 2
7.Os
8.Sh NAME
9.Nm ptrace

--- 38 unchanged lines hidden (view full) ---

48.Fa request
49argument specifies what operation is being performed; the meaning of
50the rest of the arguments depends on the operation, but except for one
51special case noted below, all
52.Fn ptrace
53calls are made by the tracing process, and the
54.Fa pid
55argument specifies the process ID of the traced process.
56The
56.Fa request
57.Fa request
58argument
57can be:
58.Bl -tag -width 12n
59.It Dv PT_TRACE_ME
60This request is the only one used by the traced process; it declares
61that the process expects to be traced by its parent.
62All the other arguments are ignored.
63(If the parent process does not expect to trace the child, it will
64probably be rather confused by the results; once the traced process

--- 67 unchanged lines hidden (view full) ---

132The
133.Fa data
134argument is ignored.
135The actual number of bytes read or written is stored in
136.Va piod_len
137upon return.
138.It Dv PT_CONTINUE
139The traced process continues execution.
59can be:
60.Bl -tag -width 12n
61.It Dv PT_TRACE_ME
62This request is the only one used by the traced process; it declares
63that the process expects to be traced by its parent.
64All the other arguments are ignored.
65(If the parent process does not expect to trace the child, it will
66probably be rather confused by the results; once the traced process

--- 67 unchanged lines hidden (view full) ---

134The
135.Fa data
136argument is ignored.
137The actual number of bytes read or written is stored in
138.Va piod_len
139upon return.
140.It Dv PT_CONTINUE
141The traced process continues execution.
142The
140.Fa addr
143.Fa addr
144argument
141is an address specifying the place where execution is to be resumed
142(a new value for the program counter),
143or
144.Po Vt caddr_t Pc Ns 1
145to indicate that execution is to pick up where it left off.
145is an address specifying the place where execution is to be resumed
146(a new value for the program counter),
147or
148.Po Vt caddr_t Pc Ns 1
149to indicate that execution is to pick up where it left off.
150The
146.Fa data
151.Fa data
152argument
147provides a signal number to be delivered to the traced process as it
148resumes execution, or 0 if no signal is to be sent.
149.It Dv PT_STEP
150The traced process is single stepped one instruction.
153provides a signal number to be delivered to the traced process as it
154resumes execution, or 0 if no signal is to be sent.
155.It Dv PT_STEP
156The traced process is single stepped one instruction.
157The
151.Fa addr
158.Fa addr
159argument
152should be passed
153.Po Vt caddr_t Pc Ns 1 .
160should be passed
161.Po Vt caddr_t Pc Ns 1 .
162The
154.Fa data
163.Fa data
164argument
155is not used.
156.It Dv PT_KILL
157The traced process terminates, as if
158.Dv PT_CONTINUE
159had been used with
160.Dv SIGKILL
161given as the signal to be delivered.
162.It Dv PT_ATTACH

--- 104 unchanged lines hidden (view full) ---

267.Bl -bullet -compact
268.It
269A process attempted to use
270.Dv PT_ATTACH
271on itself.
272.It
273The
274.Fa request
165is not used.
166.It Dv PT_KILL
167The traced process terminates, as if
168.Dv PT_CONTINUE
169had been used with
170.Dv SIGKILL
171given as the signal to be delivered.
172.It Dv PT_ATTACH

--- 104 unchanged lines hidden (view full) ---

277.Bl -bullet -compact
278.It
279A process attempted to use
280.Dv PT_ATTACH
281on itself.
282.It
283The
284.Fa request
285argument
275was not one of the legal requests.
276.It
277The signal number
278(in
279.Fa data )
280to
281.Dv PT_CONTINUE
282was neither 0 nor a legal signal number.

--- 52 unchanged lines hidden ---
286was not one of the legal requests.
287.It
288The signal number
289(in
290.Fa data )
291to
292.Dv PT_CONTINUE
293was neither 0 nor a legal signal number.

--- 52 unchanged lines hidden ---