GDB (xrefs)
|
#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 my_waitpid(), spu_child_post_attach(), and spu_child_post_startup_inferior().
#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 linux_handle_extended_wait().
#define PTRACE_EVENT_EXEC 4 |
Definition at line 74 of file linux-ptrace.h.
Referenced by linux_handle_extended_wait(), and linux_nat_filter_event().
#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 linux_handle_extended_wait(), and linux_test_for_tracefork().
#define PTRACE_EVENT_VFORK 2 |
Definition at line 72 of file linux-ptrace.h.
Referenced by linux_handle_extended_wait().
#define PTRACE_EVENT_VFORK_DONE 5 |
Definition at line 75 of file linux-ptrace.h.
Referenced by linux_handle_extended_wait().
#define PTRACE_GETEVENTMSG 0x4201 |
Definition at line 59 of file linux-ptrace.h.
Referenced by linux_handle_extended_wait(), and linux_test_for_tracefork().
#define PTRACE_GETREGSET 0x4204 |
Definition at line 47 of file linux-ptrace.h.
Referenced by aarch64_linux_get_debug_reg_capacity(), amd64_linux_fetch_inferior_registers(), amd64_linux_store_inferior_registers(), arm_linux_read_description(), check_regset(), fetch_fpregister(), fetch_fpregs(), fetch_fpregs_from_thread(), fetch_gregs_from_thread(), fetch_register(), fetch_regs(), fetch_regset(), fetch_vfp_regs(), fetch_xstateregs(), ps_get_thread_area(), store_fpregister(), store_fpregs(), store_fpregs_to_thread(), store_gregs_to_thread(), store_register(), store_regs(), store_regset(), store_vfp_regs(), store_xstateregs(), and x86_linux_read_description().
#define PTRACE_GETSIGINFO 0x4202 |
Definition at line 42 of file linux-ptrace.h.
Referenced by linux_nat_get_siginfo(), and linux_xfer_siginfo().
#define PTRACE_O_EXITKILL 0x00100000 |
Definition at line 82 of file linux-ptrace.h.
Referenced by linux_nat_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_nat_ptrace_options(), and 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_nat_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_nat_ptrace_options(), 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_nat_ptrace_options(), and linux_test_for_tracefork().
#define PTRACE_O_TRACEVFORKDONE 0x00000020 |
Definition at line 67 of file linux-ptrace.h.
Referenced by linux_nat_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(), amd64_linux_store_inferior_registers(), store_fpregister(), store_fpregs(), store_fpregs_to_thread(), store_gregs_to_thread(), store_register(), store_regs(), store_regset(), store_vfp_regs(), and store_xstateregs().
#define PTRACE_SETSIGINFO 0x4203 |
Definition at line 43 of file linux-ptrace.h.
Referenced by linux_xfer_siginfo().
#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.
#define TRAP_HWBKPT 4 |
Definition at line 147 of file linux-ptrace.h.
#define USE_SIGTRAP_SIGINFO 1 |
Definition at line 117 of file linux-ptrace.h.
Referenced by linux_nat_supports_stopped_by_hw_breakpoint(), linux_nat_supports_stopped_by_sw_breakpoint(), and linux_nat_wait_1().
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(), PTRACE_TYPE_ARG3, PTRACE_TYPE_ARG4, status, supported_ptrace_options, warning(), and WIFSTOPPED.
Referenced by 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(), PTRACE_SETOPTIONS, and PTRACE_TYPE_ARG3.
Referenced by linux_child_follow_fork().
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(), PTRACE_O_TRACECLONE, PTRACE_SETOPTIONS, PTRACE_TYPE_ARG3, PTRACE_TYPE_ARG4, and supported_ptrace_options.
Referenced by linux_init_ptrace(), linux_nat_filter_event(), and wait_lwp().
Definition at line 595 of file linux-ptrace.c.
References linux_ptrace_get_extended_event().
Referenced by linux_nat_filter_event(), and wait_lwp().
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_nat_attach(), and linux_ptrace_attach_fail_reason_string().
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().
Definition at line 587 of file linux-ptrace.c.
Referenced by linux_handle_extended_wait(), linux_is_extended_waitstatus(), linux_nat_filter_event(), 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 linux_init_ptrace().
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_nat_update_thread_list(), and thread_db_use_events().
int linux_supports_tracefork | ( | void | ) |
Definition at line 535 of file linux-ptrace.c.
References PTRACE_O_TRACEFORK, and ptrace_supports_feature().
Referenced by lin_lwp_attach_lwp(), linux_child_follow_fork(), linux_child_insert_exec_catchpoint(), linux_child_insert_fork_catchpoint(), and linux_child_insert_vfork_catchpoint().
int linux_supports_tracesysgood | ( | void | ) |
Definition at line 564 of file linux-ptrace.c.
References PTRACE_O_TRACESYSGOOD, and ptrace_supports_feature().
Referenced by linux_child_set_syscall_catchpoint().
int linux_supports_tracevforkdone | ( | void | ) |
Definition at line 555 of file linux-ptrace.c.
References PTRACE_O_TRACEVFORKDONE, and ptrace_supports_feature().
Referenced by linux_child_follow_fork().
Definition at line 603 of file linux-ptrace.c.
References WIFSTOPPED, and WSTOPSIG.
Referenced by linux_nat_filter_event().