Skip to main content

Module sys_ptrace

Module sys_ptrace 

Source
Expand description

sys/ptrace.h implementation.

Non-POSIX, see https://www.man7.org/linux/man-pages/man2/ptrace.2.html.

Constants§

PTRACE_ATTACH
Attach to the process specified in pid, making it a tracee of the calling process.
PTRACE_CONT
Restart the stopped tracee process.
PTRACE_DETACH
Restart the stopped tracee as for PTRACE_CONT, but first detach from it.
PTRACE_GETFPREGS
Copy the tracee’s floating-point registers to the address data in the tracer.
PTRACE_GETREGS
Copy the tracee’s general-purpose registers to the address data in the tracer.
PTRACE_KILL
Send the tracee a SIGKILL to terminate it. Considered deprecated. Should just send SIGKILL directly instead.
PTRACE_PEEKDATA
Read a word at the address addr in the tracee’s memory, returning the word as a result of the ptrace() call.
PTRACE_PEEKTEXT
Equivalent to PTRACE_PEEKDATA.
PTRACE_POKEDATA
Copy the word data to the address addr in the tracee’s memory.
PTRACE_POKETEXT
Equivalent to PTRACE_POKEDATA.
PTRACE_SETFPREGS
Modify the tracee’s floating-point registers from the address data in the tracer.
PTRACE_SETREGS
Modify the tracee’s general-purpose registers from the address data in the tracer.
PTRACE_SINGLESTEP
Restart the stopped tracee as for PTRACE_CONT, but arrange for the tracee to be stopped after execution of a single instruction.
PTRACE_SYSCALL
Restart the stopped tracee as for PTRACE_CONT, but arrange for the tracee to be stopped at the next entry to or exit from a system call.
PTRACE_SYSEMU
Continue and stop on entry to the next system call, which will not be executed.
PTRACE_SYSEMU_SINGLESTEP
Same as PTRACE_SYSEMU but also singlestep if not a system call.
PTRACE_TRACEME
Indicate that this process is to be traced by its parent. Only used by the tracee.

Functions§

ptrace
Non-POSIX, see https://www.man7.org/linux/man-pages/man2/ptrace.2.html.