#include <sys/ptrace.h>

sys/ptrace.h

includes: sys/appleapiopts.h, sys/cdefs.h, sys/types.h
18 macros · 1 enum · 1 function

enum(anonymous)

underlying type unsigned int
ePtAttachDeprecated10

macroPT_TRACE_ME

#define PT_TRACE_ME 0
child declares it's being traced

macroPT_READ_I

#define PT_READ_I 1
read word in child's I space

macroPT_READ_D

#define PT_READ_D 2
read word in child's D space

macroPT_READ_U

#define PT_READ_U 3
read word in child's user structure

macroPT_WRITE_I

#define PT_WRITE_I 4
write word in child's I space

macroPT_WRITE_D

#define PT_WRITE_D 5
write word in child's D space

macroPT_WRITE_U

#define PT_WRITE_U 6
write word in child's user structure

macroPT_CONTINUE

#define PT_CONTINUE 7
continue the child

macroPT_KILL

#define PT_KILL 8
kill the child process

macroPT_STEP

#define PT_STEP 9
single step the child

macroPT_ATTACH

#define PT_ATTACH ePtAttachDeprecated
trace some running process

macroPT_DETACH

#define PT_DETACH 11
stop tracing a process

macroPT_SIGEXC

#define PT_SIGEXC 12
signals as exceptions for current_proc

macroPT_THUPDATE

#define PT_THUPDATE 13
signal for thread#

macroPT_ATTACHEXC

#define PT_ATTACHEXC 14
attach to running process with signal exception

macroPT_FORCEQUOTA

#define PT_FORCEQUOTA 30
Enforce quota for root

macroPT_DENY_ATTACH

#define PT_DENY_ATTACH 31

macroPT_FIRSTMACH

#define PT_FIRSTMACH 32
for machine-specific requests

functionptrace

int ptrace(int _request, pid_t _pid, caddr_t _addr, int _data)
man page · March 25, 2015
ptrace(2) — process tracing and debugging