GDBserver
Macros | Functions
linux-ptrace.h File Reference
#include <sys/ptrace.h>

Go to the source code of this file.

Macros

#define PTRACE_TYPE_ARG3   void *
 
#define PTRACE_TYPE_ARG4   void *
 
#define PTRACE_GETSIGINFO   0x4202
 
#define PTRACE_SETSIGINFO   0x4203
 
#define PTRACE_GETREGSET   0x4204
 
#define PTRACE_SETREGSET   0x4205
 
#define PTRACE_SETOPTIONS   0x4200
 
#define PTRACE_GETEVENTMSG   0x4201
 
#define PTRACE_O_TRACESYSGOOD   0x00000001
 
#define PTRACE_O_TRACEFORK   0x00000002
 
#define PTRACE_O_TRACEVFORK   0x00000004
 
#define PTRACE_O_TRACECLONE   0x00000008
 
#define PTRACE_O_TRACEEXEC   0x00000010
 
#define PTRACE_O_TRACEVFORKDONE   0x00000020
 
#define PTRACE_O_TRACEEXIT   0x00000040
 
#define PTRACE_EVENT_FORK   1
 
#define PTRACE_EVENT_VFORK   2
 
#define PTRACE_EVENT_CLONE   3
 
#define PTRACE_EVENT_EXEC   4
 
#define PTRACE_EVENT_VFORK_DONE   5
 
#define PTRACE_EVENT_EXIT   6
 
#define PTRACE_O_EXITKILL   0x00100000
 
#define __WALL   0x40000000 /* Wait for any child. */
 
#define USE_SIGTRAP_SIGINFO   1
 
#define GDB_ARCH_TRAP_BRKPT   TRAP_BRKPT
 
#define TRAP_HWBKPT   4
 

Functions

void linux_ptrace_attach_fail_reason (pid_t pid, struct buffer *buffer)
 
char * linux_ptrace_attach_fail_reason_string (ptid_t ptid, int err)
 
void linux_ptrace_init_warnings (void)
 
void linux_check_ptrace_features (void)
 
void linux_enable_event_reporting (pid_t pid, int attached)
 
void linux_disable_event_reporting (pid_t pid)
 
int linux_supports_tracefork (void)
 
int linux_supports_traceclone (void)
 
int linux_supports_tracevforkdone (void)
 
int linux_supports_tracesysgood (void)
 
int linux_ptrace_get_extended_event (int wstat)
 
int linux_is_extended_waitstatus (int wstat)
 
int linux_wstatus_maybe_breakpoint (int wstat)
 

Macro Definition Documentation

#define __WALL   0x40000000 /* Wait for any child. */
#define GDB_ARCH_TRAP_BRKPT   TRAP_BRKPT

Definition at line 143 of file linux-ptrace.h.

Referenced by check_stopped_by_breakpoint().

#define PTRACE_EVENT_CLONE   3

Definition at line 73 of file linux-ptrace.h.

Referenced by handle_extended_wait().

#define PTRACE_EVENT_EXEC   4

Definition at line 74 of file linux-ptrace.h.

#define PTRACE_EVENT_EXIT   6

Definition at line 76 of file linux-ptrace.h.

#define PTRACE_EVENT_FORK   1

Definition at line 71 of file linux-ptrace.h.

Referenced by handle_extended_wait(), and linux_test_for_tracefork().

#define PTRACE_EVENT_VFORK   2

Definition at line 72 of file linux-ptrace.h.

Referenced by handle_extended_wait().

#define PTRACE_EVENT_VFORK_DONE   5

Definition at line 75 of file linux-ptrace.h.

Referenced by handle_extended_wait().

#define PTRACE_GETEVENTMSG   0x4201

Definition at line 59 of file linux-ptrace.h.

Referenced by handle_extended_wait(), and linux_test_for_tracefork().

#define PTRACE_GETREGSET   0x4204
#define PTRACE_GETSIGINFO   0x4202
#define PTRACE_O_EXITKILL   0x00100000

Definition at line 82 of file linux-ptrace.h.

Referenced by linux_low_ptrace_options(), and linux_test_for_exitkill().

#define PTRACE_O_TRACECLONE   0x00000008
#define PTRACE_O_TRACEEXEC   0x00000010

Definition at line 66 of file linux-ptrace.h.

Referenced by linux_test_for_tracefork().

#define PTRACE_O_TRACEEXIT   0x00000040

Definition at line 68 of file linux-ptrace.h.

#define PTRACE_O_TRACEFORK   0x00000002
#define PTRACE_O_TRACESYSGOOD   0x00000001

Definition at line 62 of file linux-ptrace.h.

Referenced by linux_supports_tracesysgood(), and linux_test_for_tracesysgood().

#define PTRACE_O_TRACEVFORK   0x00000004

Definition at line 64 of file linux-ptrace.h.

Referenced by linux_low_ptrace_options(), and linux_test_for_tracefork().

#define PTRACE_O_TRACEVFORKDONE   0x00000020
#define PTRACE_SETOPTIONS   0x4200
#define PTRACE_SETREGSET   0x4205

Definition at line 51 of file linux-ptrace.h.

Referenced by aarch64_linux_set_debug_regs().

#define PTRACE_SETSIGINFO   0x4203
#define PTRACE_TYPE_ARG3   void *

Definition at line 34 of file linux-ptrace.h.

#define PTRACE_TYPE_ARG4   void *
#define TRAP_HWBKPT   4

Definition at line 147 of file linux-ptrace.h.

Referenced by check_stopped_by_breakpoint().

#define USE_SIGTRAP_SIGINFO   1

Function Documentation

void linux_check_ptrace_features ( void  )
void linux_disable_event_reporting ( pid_t  pid)

Definition at line 510 of file linux-ptrace.c.

References PTRACE_SETOPTIONS, and PTRACE_TYPE_ARG3.

void linux_enable_event_reporting ( pid_t  pid,
int  attached 
)
int linux_is_extended_waitstatus ( int  wstat)

Definition at line 595 of file linux-ptrace.c.

References linux_ptrace_get_extended_event().

Referenced by get_detach_signal(), and linux_low_filter_event().

void linux_ptrace_attach_fail_reason ( pid_t  pid,
struct buffer buffer 
)
char* linux_ptrace_attach_fail_reason_string ( ptid_t  ptid,
int  err 
)
int linux_ptrace_get_extended_event ( int  wstat)
void linux_ptrace_init_warnings ( void  )

Definition at line 573 of file linux-ptrace.c.

References linux_ptrace_test_ret_to_nx().

Referenced by initialize_low().

int linux_supports_traceclone ( void  )

Definition at line 546 of file linux-ptrace.c.

References PTRACE_O_TRACECLONE, and ptrace_supports_feature().

Referenced by linux_look_up_symbols().

int linux_supports_tracefork ( void  )
int linux_supports_tracesysgood ( void  )

Definition at line 564 of file linux-ptrace.c.

References PTRACE_O_TRACESYSGOOD, and ptrace_supports_feature().

int linux_supports_tracevforkdone ( void  )

Definition at line 555 of file linux-ptrace.c.

References PTRACE_O_TRACEVFORKDONE, and ptrace_supports_feature().

int linux_wstatus_maybe_breakpoint ( int  wstat)

Definition at line 603 of file linux-ptrace.c.

References WIFSTOPPED, and WSTOPSIG.

Referenced by linux_low_filter_event(), and linux_wait_1().