GDBserver
|
#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) |
#define __WALL 0x40000000 /* Wait for any child. */ |
Definition at line 96 of file linux-ptrace.h.
Referenced by complete_ongoing_step_over(), handle_extended_wait(), linux_wait_1(), my_waitpid(), spu_wait(), and wait_for_sigstop().
#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 |
Definition at line 47 of file linux-ptrace.h.
Referenced by aarch64_arch_setup(), ps_get_thread_area(), s390_arch_setup(), s390_check_regset(), and x86_linux_read_description().
#define PTRACE_GETSIGINFO 0x4202 |
Definition at line 42 of file linux-ptrace.h.
Referenced by aarch64_stopped_data_address(), arm_stopped_by_watchpoint(), check_stopped_by_breakpoint(), enqueue_one_deferred_signal(), linux_resume_one_thread(), linux_wait_1(), linux_xfer_siginfo(), and maybe_move_out_of_jump_pad().
#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 |
Definition at line 65 of file linux-ptrace.h.
Referenced by linux_enable_event_reporting(), linux_supports_traceclone(), and linux_test_for_tracefork().
#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 |
Definition at line 63 of file linux-ptrace.h.
Referenced by linux_low_ptrace_options(), linux_supports_tracefork(), and linux_test_for_tracefork().
#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 |
Definition at line 67 of file linux-ptrace.h.
Referenced by linux_low_ptrace_options(), linux_supports_tracevforkdone(), and linux_test_for_tracefork().
#define PTRACE_SETOPTIONS 0x4200 |
Definition at line 58 of file linux-ptrace.h.
Referenced by linux_disable_event_reporting(), linux_enable_event_reporting(), linux_test_for_exitkill(), linux_test_for_tracefork(), and linux_test_for_tracesysgood().
#define PTRACE_SETREGSET 0x4205 |
Definition at line 51 of file linux-ptrace.h.
Referenced by aarch64_linux_set_debug_regs().
#define PTRACE_SETSIGINFO 0x4203 |
Definition at line 43 of file linux-ptrace.h.
Referenced by dequeue_one_deferred_signal(), linux_resume_one_lwp_throw(), linux_xfer_siginfo(), and maybe_move_out_of_jump_pad().
#define PTRACE_TYPE_ARG3 void * |
Definition at line 34 of file linux-ptrace.h.
#define PTRACE_TYPE_ARG4 void * |
Definition at line 38 of file linux-ptrace.h.
Referenced by linux_attach_lwp(), linux_check_ptrace_features(), linux_child_function(), linux_create_inferior(), linux_detach_one_lwp(), linux_enable_event_reporting(), linux_kill_one_lwp(), linux_ptrace_test_ret_to_nx(), linux_read_memory(), linux_resume_one_lwp_throw(), linux_test_for_exitkill(), linux_test_for_tracefork(), linux_test_for_tracesysgood(), and linux_write_memory().
#define TRAP_HWBKPT 4 |
Definition at line 147 of file linux-ptrace.h.
Referenced by check_stopped_by_breakpoint().
#define USE_SIGTRAP_SIGINFO 1 |
Definition at line 117 of file linux-ptrace.h.
Referenced by linux_supports_stopped_by_hw_breakpoint(), and linux_supports_stopped_by_sw_breakpoint().
void linux_check_ptrace_features | ( | void | ) |
Definition at line 335 of file linux-ptrace.c.
References _, error(), linux_child_function(), linux_fork_to_function(), linux_test_for_exitkill(), linux_test_for_tracefork(), linux_test_for_tracesysgood(), my_waitpid(), perror_with_name(), PTRACE_TYPE_ARG3, PTRACE_TYPE_ARG4, supported_ptrace_options, warning(), and WIFSTOPPED.
Referenced by initialize_low(), linux_enable_event_reporting(), and ptrace_supports_feature().
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 | ||
) |
Definition at line 489 of file linux-ptrace.c.
References linux_check_ptrace_features(), PTRACE_O_TRACECLONE, PTRACE_SETOPTIONS, PTRACE_TYPE_ARG3, PTRACE_TYPE_ARG4, and supported_ptrace_options.
Referenced by linux_low_filter_event(), and reset_lwp_ptrace_options_callback().
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 | ||
) |
Definition at line 36 of file linux-ptrace.c.
References _, buffer_xml_printf(), linux_proc_get_tracerpid_nowarn(), and linux_proc_pid_is_zombie_nowarn().
Referenced by linux_ptrace_attach_fail_reason_string().
char* linux_ptrace_attach_fail_reason_string | ( | ptid_t | ptid, |
int | err | ||
) |
Definition at line 55 of file linux-ptrace.c.
References buffer_finish(), buffer_grow_str0, buffer_init(), linux_ptrace_attach_fail_reason(), ptid_get_lwp(), safe_strerror(), xfree(), and xstrprintf().
Referenced by attach_proc_task_lwp_callback(), attach_thread(), and linux_attach().
int linux_ptrace_get_extended_event | ( | int | wstat | ) |
Definition at line 587 of file linux-ptrace.c.
Referenced by handle_extended_wait(), linux_is_extended_waitstatus(), and linux_test_for_tracefork().
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 | ) |
Definition at line 535 of file linux-ptrace.c.
References PTRACE_O_TRACEFORK, and ptrace_supports_feature().
Referenced by linux_supports_fork_events(), and linux_supports_vfork_events().
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().