GDB (xrefs)
|
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_IS_TRAP_BRKPT(X) ((X) == TRAP_BRKPT) |
#define | GDB_ARCH_IS_TRAP_HWBKPT(X) ((X) == TRAP_HWBKPT) |
#define | TRAP_HWBKPT 4 |
Functions | |
std::string | linux_ptrace_attach_fail_reason (pid_t pid) |
std::string | 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_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 97 of file linux-ptrace.h.
Definition at line 171 of file linux-ptrace.h.
#define GDB_ARCH_IS_TRAP_HWBKPT | ( | X | ) | ((X) == TRAP_HWBKPT) |
Definition at line 172 of file linux-ptrace.h.
#define PTRACE_EVENT_CLONE 3 |
Definition at line 74 of file linux-ptrace.h.
#define PTRACE_EVENT_EXEC 4 |
Definition at line 75 of file linux-ptrace.h.
#define PTRACE_EVENT_EXIT 6 |
Definition at line 77 of file linux-ptrace.h.
#define PTRACE_EVENT_FORK 1 |
Definition at line 72 of file linux-ptrace.h.
#define PTRACE_EVENT_VFORK 2 |
Definition at line 73 of file linux-ptrace.h.
#define PTRACE_EVENT_VFORK_DONE 5 |
Definition at line 76 of file linux-ptrace.h.
#define PTRACE_GETEVENTMSG 0x4201 |
Definition at line 60 of file linux-ptrace.h.
#define PTRACE_GETREGSET 0x4204 |
Definition at line 48 of file linux-ptrace.h.
#define PTRACE_GETSIGINFO 0x4202 |
Definition at line 43 of file linux-ptrace.h.
#define PTRACE_O_EXITKILL 0x00100000 |
Definition at line 83 of file linux-ptrace.h.
#define PTRACE_O_TRACECLONE 0x00000008 |
Definition at line 66 of file linux-ptrace.h.
#define PTRACE_O_TRACEEXEC 0x00000010 |
Definition at line 67 of file linux-ptrace.h.
#define PTRACE_O_TRACEEXIT 0x00000040 |
Definition at line 69 of file linux-ptrace.h.
#define PTRACE_O_TRACEFORK 0x00000002 |
Definition at line 64 of file linux-ptrace.h.
#define PTRACE_O_TRACESYSGOOD 0x00000001 |
Definition at line 63 of file linux-ptrace.h.
#define PTRACE_O_TRACEVFORK 0x00000004 |
Definition at line 65 of file linux-ptrace.h.
#define PTRACE_O_TRACEVFORKDONE 0x00000020 |
Definition at line 68 of file linux-ptrace.h.
#define PTRACE_SETOPTIONS 0x4200 |
Definition at line 59 of file linux-ptrace.h.
#define PTRACE_SETREGSET 0x4205 |
Definition at line 52 of file linux-ptrace.h.
#define PTRACE_SETSIGINFO 0x4203 |
Definition at line 44 of file linux-ptrace.h.
#define PTRACE_TYPE_ARG3 void * |
Definition at line 35 of file linux-ptrace.h.
#define PTRACE_TYPE_ARG4 void * |
Definition at line 39 of file linux-ptrace.h.
#define TRAP_HWBKPT 4 |
Definition at line 176 of file linux-ptrace.h.
#define USE_SIGTRAP_SIGINFO 1 |
Definition at line 118 of file linux-ptrace.h.
void linux_check_ptrace_features | ( | void | ) |
Definition at line 323 of file linux-ptrace.c.
References kill_child(), linux_child_function(), linux_fork_to_function(), linux_test_for_exitkill(), my_waitpid(), perror_with_name(), PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEFORK, PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEVFORK, PTRACE_O_TRACEVFORKDONE, status, and supported_ptrace_options.
Referenced by linux_enable_event_reporting().
void linux_disable_event_reporting | ( | pid_t | pid | ) |
Definition at line 400 of file linux-ptrace.c.
References pid, ptrace, PTRACE_SETOPTIONS, and PTRACE_TYPE_ARG3.
Referenced by linux_nat_target::follow_fork().
void linux_enable_event_reporting | ( | pid_t | pid, |
int | attached | ||
) |
Definition at line 379 of file linux-ptrace.c.
References linux_check_ptrace_features(), pid, ptrace, PTRACE_O_TRACECLONE, PTRACE_SETOPTIONS, PTRACE_TYPE_ARG3, PTRACE_TYPE_ARG4, and supported_ptrace_options.
Referenced by linux_init_ptrace_procfs(), linux_nat_filter_event(), and wait_lwp().
int linux_is_extended_waitstatus | ( | int | wstat | ) |
Definition at line 432 of file linux-ptrace.c.
References linux_ptrace_get_extended_event().
Referenced by detach_one_lwp(), linux_nat_filter_event(), and wait_lwp().
std::string linux_ptrace_attach_fail_reason | ( | pid_t | pid | ) |
Definition at line 37 of file linux-ptrace.c.
References linux_proc_get_tracerpid_nowarn(), linux_proc_pid_is_zombie_nowarn(), and pid.
Referenced by linux_nat_target::attach(), and linux_ptrace_attach_fail_reason_string().
std::string linux_ptrace_attach_fail_reason_string | ( | ptid_t | ptid, |
int | err | ||
) |
Definition at line 59 of file linux-ptrace.c.
References err, and linux_ptrace_attach_fail_reason().
Referenced by attach_proc_task_lwp_callback().
int linux_ptrace_get_extended_event | ( | int | wstat | ) |
Definition at line 424 of file linux-ptrace.c.
Referenced by detach_one_lwp(), linux_handle_extended_wait(), linux_is_extended_waitstatus(), and linux_nat_filter_event().
void linux_ptrace_init_warnings | ( | void | ) |
Definition at line 410 of file linux-ptrace.c.
References linux_ptrace_test_ret_to_nx().
Referenced by linux_init_ptrace_procfs().
int linux_wstatus_maybe_breakpoint | ( | int | wstat | ) |
Definition at line 440 of file linux-ptrace.c.
Referenced by linux_nat_filter_event().