18 #ifndef COMMON_LINUX_PTRACE_H
19 #define COMMON_LINUX_PTRACE_H
23 #include <sys/ptrace.h>
26 #if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__))
28 #include <asm/ptrace.h>
33 #if !defined(PTRACE_TYPE_ARG3)
34 #define PTRACE_TYPE_ARG3 void *
37 #if !defined(PTRACE_TYPE_ARG4)
38 #define PTRACE_TYPE_ARG4 void *
41 #ifndef PTRACE_GETSIGINFO
42 # define PTRACE_GETSIGINFO 0x4202
43 # define PTRACE_SETSIGINFO 0x4203
46 #ifndef PTRACE_GETREGSET
47 #define PTRACE_GETREGSET 0x4204
50 #ifndef PTRACE_SETREGSET
51 #define PTRACE_SETREGSET 0x4205
56 #ifndef PTRACE_EVENT_FORK
58 #define PTRACE_SETOPTIONS 0x4200
59 #define PTRACE_GETEVENTMSG 0x4201
62 #define PTRACE_O_TRACESYSGOOD 0x00000001
63 #define PTRACE_O_TRACEFORK 0x00000002
64 #define PTRACE_O_TRACEVFORK 0x00000004
65 #define PTRACE_O_TRACECLONE 0x00000008
66 #define PTRACE_O_TRACEEXEC 0x00000010
67 #define PTRACE_O_TRACEVFORKDONE 0x00000020
68 #define PTRACE_O_TRACEEXIT 0x00000040
71 #define PTRACE_EVENT_FORK 1
72 #define PTRACE_EVENT_VFORK 2
73 #define PTRACE_EVENT_CLONE 3
74 #define PTRACE_EVENT_EXEC 4
75 #define PTRACE_EVENT_VFORK_DONE 5
76 #define PTRACE_EVENT_EXIT 6
80 #ifndef PTRACE_O_EXITKILL
82 #define PTRACE_O_EXITKILL 0x00100000
85 #if (defined __bfin__ || defined __frv__ || defined __sh__) \
86 && !defined PTRACE_GETFDPIC
87 #define PTRACE_GETFDPIC 31
88 #define PTRACE_GETFDPIC_EXEC 0
89 #define PTRACE_GETFDPIC_INTERP 1
96 #define __WALL 0x40000000
117 #define USE_SIGTRAP_SIGINFO 1
140 #if defined __i386__ || defined __x86_64__
141 # define GDB_ARCH_TRAP_BRKPT SI_KERNEL
143 # define GDB_ARCH_TRAP_BRKPT TRAP_BRKPT
147 # define TRAP_HWBKPT 4
void linux_ptrace_init_warnings(void)
void linux_enable_event_reporting(pid_t pid, int attached)
int linux_supports_tracefork(void)
int linux_ptrace_get_extended_event(int wstat)
int linux_is_extended_waitstatus(int wstat)
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t err
void linux_disable_event_reporting(pid_t pid)
char * linux_ptrace_attach_fail_reason_string(ptid_t ptid, int err)
void linux_ptrace_attach_fail_reason(pid_t pid, struct buffer *buffer)
void linux_check_ptrace_features(void)
int linux_supports_tracevforkdone(void)
int linux_supports_tracesysgood(void)
int linux_wstatus_maybe_breakpoint(int wstat)
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t int int rusage_t pid_t pid
int linux_supports_traceclone(void)