PTRACE(2)

NAME
ptrace - ptrace system call.

SYNOPSIS

#include <sys/ptrace.h>
long ptrace( int req, pid_t pid, long addr, long data)

DESCRIPTION

Ptrace(2) is called with following arguments:

req request
pid process id
addr address
data data

REQUESTS

T_STOP stop the process.
T_OK enable tracing by parent for this process.
T_GETINS return value from instruction space
T_GETDATA return value from data space.
T_GETUSER return value from process table. See proc.h in kernel.
T_SETINS set value from instruction space.
T_SETDATA set value from data space.
T_SETUSER set value in process table.
T_RESUME resume execution.
T_EXIT exit. Turn off tracing.
T_STEP set trace bit to enable single step.

SEE ALSO

mdb(1)

DIAGNOSTICS

errno is set by ptrace().

FILES

/usr/src/kernel/proc.h for process table info.