Rev | Line | |
---|
[9] | 1 | .TH PTRACE 2
|
---|
| 2 | .SH NAME
|
---|
| 3 | ptrace \- ptrace system call.
|
---|
| 4 | .SH SYNOPSIS
|
---|
| 5 | .ft B
|
---|
| 6 | .nf
|
---|
| 7 | .sp
|
---|
| 8 | #include <sys/ptrace.h>
|
---|
| 9 |
|
---|
| 10 | long ptrace( int req, pid_t pid, long addr, long data)
|
---|
| 11 |
|
---|
| 12 | .fi
|
---|
| 13 | .ft P
|
---|
| 14 | .SH DESCRIPTION
|
---|
| 15 | .sp
|
---|
| 16 | Ptrace(2) is called with following arguments:
|
---|
| 17 | .sp
|
---|
| 18 | .br
|
---|
| 19 | req
|
---|
| 20 | request
|
---|
| 21 | .br
|
---|
| 22 | pid
|
---|
| 23 | process id
|
---|
| 24 | .br
|
---|
| 25 | addr
|
---|
| 26 | address
|
---|
| 27 | .br
|
---|
| 28 | data
|
---|
| 29 | data
|
---|
| 30 | .br
|
---|
| 31 | .SH REQUESTS
|
---|
| 32 | .sp
|
---|
| 33 | .I
|
---|
| 34 | T_STOP
|
---|
| 35 | stop the process.
|
---|
| 36 | .br
|
---|
| 37 | .I
|
---|
| 38 | T_OK
|
---|
| 39 | enable tracing by parent for this process.
|
---|
| 40 | .br
|
---|
| 41 | .I
|
---|
| 42 | T_GETINS
|
---|
| 43 | return value from instruction space
|
---|
| 44 | .br
|
---|
| 45 | .I
|
---|
| 46 | T_GETDATA
|
---|
| 47 | return value from data space.
|
---|
| 48 | .br
|
---|
| 49 | .I
|
---|
| 50 | T_GETUSER
|
---|
| 51 | return value from process table. See proc.h in kernel.
|
---|
| 52 | .br
|
---|
| 53 | .I
|
---|
| 54 | T_SETINS
|
---|
| 55 | set value from instruction space.
|
---|
| 56 | .br
|
---|
| 57 | .I
|
---|
| 58 | T_SETDATA
|
---|
| 59 | set value from data space.
|
---|
| 60 | .br
|
---|
| 61 | .I
|
---|
| 62 | T_SETUSER
|
---|
| 63 | set value in process table.
|
---|
| 64 | .br
|
---|
| 65 | .I
|
---|
| 66 | T_RESUME
|
---|
| 67 | resume execution.
|
---|
| 68 | .br
|
---|
| 69 | .I
|
---|
| 70 | T_EXIT
|
---|
| 71 | exit. Turn off tracing.
|
---|
| 72 | .br
|
---|
| 73 | .I
|
---|
| 74 | T_STEP
|
---|
| 75 | set trace bit to enable single step.
|
---|
| 76 | .SH "SEE ALSO"
|
---|
| 77 | .sp
|
---|
| 78 | mdb(1)
|
---|
| 79 | .SH DIAGNOSTICS
|
---|
| 80 | .sp
|
---|
| 81 | errno is set by ptrace().
|
---|
| 82 | .SH FILES
|
---|
| 83 | .sp
|
---|
| 84 | /usr/src/kernel/proc.h for process table info.
|
---|
| 85 |
|
---|
| 86 |
|
---|
| 87 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.