|
GDB (xrefs)
|
#include "defs.h"#include "command.h"#include "inferior.h"#include "inflow.h"#include "terminal.h"#include "gdbcore.h"#include "regcache.h"#include "nat/gdb_ptrace.h"#include "gdb_wait.h"#include <signal.h>#include "inf-ptrace.h"#include "inf-child.h"#include "gdbthread.h"#include "nat/fork-inferior.h"#include "utils.h"Go to the source code of this file.
Functions | |
| static void | inf_ptrace_me (void) |
| static void | inf_ptrace_create_inferior (struct target_ops *ops, const char *exec_file, const std::string &allargs, char **env, int from_tty) |
| static void | inf_ptrace_mourn_inferior (struct target_ops *ops) |
| static void | inf_ptrace_attach (struct target_ops *ops, const char *args, int from_tty) |
| static void | inf_ptrace_detach (struct target_ops *ops, const char *args, int from_tty) |
| void | inf_ptrace_detach_success (struct target_ops *ops) |
| static void | inf_ptrace_kill (struct target_ops *ops) |
| static void | inf_ptrace_interrupt (struct target_ops *self, ptid_t ptid) |
| pid_t | get_ptrace_pid (ptid_t ptid) |
| static void | inf_ptrace_resume (struct target_ops *ops, ptid_t ptid, int step, enum gdb_signal signal) |
| static ptid_t | inf_ptrace_wait (struct target_ops *ops, ptid_t ptid, struct target_waitstatus *ourstatus, int options) |
| static ULONGEST | inf_ptrace_peek_poke (pid_t pid, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST addr, ULONGEST len) |
| static enum target_xfer_status | inf_ptrace_xfer_partial (struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len) |
| static int | inf_ptrace_thread_alive (struct target_ops *ops, ptid_t ptid) |
| static void | inf_ptrace_files_info (struct target_ops *ignore) |
| static const char * | inf_ptrace_pid_to_str (struct target_ops *ops, ptid_t ptid) |
| struct target_ops * | inf_ptrace_target (void) |
| static void | inf_ptrace_fetch_register (struct regcache *regcache, int regnum) |
| static void | inf_ptrace_fetch_registers (struct target_ops *ops, struct regcache *regcache, int regnum) |
| static void | inf_ptrace_store_register (const struct regcache *regcache, int regnum) |
| static void | inf_ptrace_store_registers (struct target_ops *ops, struct regcache *regcache, int regnum) |
| struct target_ops * | inf_ptrace_trad_target (CORE_ADDR(*register_u_offset)(struct gdbarch *, int, int)) |
Variables | |
| static CORE_ADDR(* | inf_ptrace_register_u_offset )(struct gdbarch *, int, int) |
| pid_t get_ptrace_pid | ( | ptid_t | ptid | ) |
Definition at line 320 of file inf-ptrace.c.
References pid, ptid_get_lwp(), and ptid_get_pid().
Referenced by aarch64_fbsd_fetch_inferior_registers(), aarch64_fbsd_store_inferior_registers(), amd64bsd_fetch_inferior_registers(), amd64bsd_store_inferior_registers(), arm_fbsd_fetch_inferior_registers(), arm_fbsd_store_inferior_registers(), fetch_inferior_registers(), fetch_register(), i386_linux_fetch_inferior_registers(), i386_linux_store_inferior_registers(), i386bsd_fetch_inferior_registers(), i386bsd_store_inferior_registers(), ia64_linux_fetch_register(), ia64_linux_store_register(), inf_ptrace_fetch_register(), inf_ptrace_resume(), inf_ptrace_store_register(), inf_ptrace_xfer_partial(), m32r_linux_fetch_inferior_registers(), m32r_linux_store_inferior_registers(), m68k_linux_fetch_inferior_registers(), m68k_linux_store_inferior_registers(), mips64_linux_regsets_fetch_registers(), mips64_linux_regsets_store_registers(), mips_fbsd_fetch_inferior_registers(), mips_fbsd_store_inferior_registers(), ppc_linux_fetch_inferior_registers(), ppc_linux_store_inferior_registers(), s390_linux_fetch_inferior_registers(), s390_linux_store_inferior_registers(), sparc_fetch_inferior_registers(), sparc_store_inferior_registers(), store_inferior_registers(), and store_register().
|
static |
Definition at line 168 of file inf-ptrace.c.
References _, add_thread_silent(), current_inferior(), discard_cleanups(), error(), gdb_flush(), gdb_stdout, get_exec_file(), arm-linux::inf, inferior_appeared(), inferior_ptid, make_cleanup(), make_cleanup_unpush_target(), null_cleanup(), parse_pid_to_attach(), perror_with_name(), pid, pid_to_ptid(), printf_unfiltered(), ptrace(), PTRACE_TYPE_ARG3, push_target(), target_is_pushed(), and target_pid_to_str().
Referenced by inf_ptrace_target().
|
static |
Definition at line 94 of file inf-ptrace.c.
References add_thread_silent(), discard_cleanups(), fork_inferior(), gdb_startup_inferior(), inf_ptrace_me(), make_cleanup(), make_cleanup_unpush_target(), null_cleanup(), pid, pid_to_ptid(), thread_info::ptid, push_target(), START_INFERIOR_TRAPS_EXPECTED, target_is_pushed(), and target_post_startup_inferior.
Referenced by inf_ptrace_target().
|
static |
Definition at line 248 of file inf-ptrace.c.
References _, error(), inf_ptrace_detach_success(), inferior_ptid, perror_with_name(), pid, ptid_get_pid(), ptrace(), PTRACE_TYPE_ARG3, and target_announce_detach().
Referenced by inf_ptrace_target().
| void inf_ptrace_detach_success | ( | struct target_ops * | ops | ) |
Definition at line 276 of file inf-ptrace.c.
References detach_inferior(), inf_child_maybe_unpush_target(), inferior_ptid, null_ptid, pid, and ptid_get_pid().
Referenced by inf_ptrace_detach(), and linux_nat_detach().
|
static |
Definition at line 714 of file inf-ptrace.c.
References _, regcache::arch(), error(), gdb_assert, gdbarch_cannot_fetch_register(), gdbarch_register_name(), get_ptrace_pid(), inf_ptrace_register_u_offset, pid, PT_READ_U, ptrace(), PTRACE_TYPE_ARG3, PTRACE_TYPE_RET, regcache_get_ptid(), regcache_raw_supply(), register_size(), regnum, safe_strerror(), and size.
Referenced by inf_ptrace_fetch_registers().
|
static |
Definition at line 757 of file inf-ptrace.c.
References regcache::arch(), gdbarch_num_regs(), inf_ptrace_fetch_register(), and regnum.
Referenced by inf_ptrace_trad_target().
|
static |
Definition at line 622 of file inf-ptrace.c.
References _, current_inferior(), inferior_ptid, printf_filtered(), and target_pid_to_str().
Referenced by inf_ptrace_target().
|
static |
Definition at line 306 of file inf-ptrace.c.
References inferior_process_group().
Referenced by inf_ptrace_target().
|
static |
Definition at line 289 of file inf-ptrace.c.
References inferior_ptid, pid, PT_KILL, ptid_get_pid(), ptrace(), PTRACE_TYPE_ARG3, status, and target_mourn_inferior().
Referenced by inf_ptrace_target().
|
static |
Definition at line 81 of file inf-ptrace.c.
References PT_TRACE_ME, ptrace(), PTRACE_TYPE_ARG3, and trace_start_error_with_name().
Referenced by inf_ptrace_create_inferior().
|
static |
Definition at line 151 of file inf-ptrace.c.
References inf_child_mourn_inferior(), inferior_ptid, ptid_get_pid(), and status.
Referenced by inf_ptrace_target().
|
static |
Definition at line 464 of file inf-ptrace.c.
References pid, PT_READ_I, PT_WRITE_D, PT_WRITE_I, ptrace(), PTRACE_TYPE_ARG3, and PTRACE_TYPE_RET.
Referenced by inf_ptrace_xfer_partial().
|
static |
Definition at line 632 of file inf-ptrace.c.
References normal_pid_to_str().
Referenced by inf_ptrace_target().
|
static |
Definition at line 337 of file inf-ptrace.c.
References catch_syscall_enabled(), gdb_signal_to_host(), get_ptrace_pid(), inferior_ptid, minus_one_ptid, perror_with_name(), pid, PT_CONTINUE, PT_STEP, PT_SYSCALL, ptid_equal(), ptid_get_pid(), ptrace(), and PTRACE_TYPE_ARG3.
Referenced by inf_ptrace_target().
|
static |
Definition at line 772 of file inf-ptrace.c.
References _, regcache::arch(), error(), gdb_assert, gdbarch_cannot_store_register(), gdbarch_register_name(), get_ptrace_pid(), inf_ptrace_register_u_offset, pid, PT_WRITE_U, ptrace(), PTRACE_TYPE_ARG3, PTRACE_TYPE_RET, regcache_get_ptid(), regcache_raw_collect(), register_size(), regnum, safe_strerror(), and size.
Referenced by inf_ptrace_store_registers().
|
static |
Definition at line 812 of file inf-ptrace.c.
References regcache::arch(), gdbarch_num_regs(), inf_ptrace_store_register(), and regnum.
Referenced by inf_ptrace_trad_target().
| struct target_ops* inf_ptrace_target | ( | void | ) |
Definition at line 676 of file inf-ptrace.c.
References inf_child_target(), inf_ptrace_attach(), inf_ptrace_create_inferior(), inf_ptrace_detach(), inf_ptrace_files_info(), inf_ptrace_interrupt(), inf_ptrace_kill(), inf_ptrace_mourn_inferior(), inf_ptrace_pid_to_str(), inf_ptrace_resume(), inf_ptrace_thread_alive(), inf_ptrace_wait(), inf_ptrace_xfer_partial(), target_ops::to_attach, target_ops::to_auxv_parse, target_ops::to_create_inferior, target_ops::to_detach, target_ops::to_files_info, target_ops::to_follow_fork, target_ops::to_insert_fork_catchpoint, target_ops::to_interrupt, target_ops::to_kill, target_ops::to_mourn_inferior, target_ops::to_pid_to_str, target_ops::to_post_attach, target_ops::to_post_startup_inferior, target_ops::to_remove_fork_catchpoint, target_ops::to_resume, target_ops::to_thread_alive, target_ops::to_wait, and target_ops::to_xfer_partial.
Referenced by _initialize_aarch64_fbsd_nat(), _initialize_alphabsd_nat(), _initialize_arm_fbsd_nat(), _initialize_arm_netbsd_nat(), _initialize_hppanbsd_nat(), _initialize_hppaobsd_nat(), _initialize_m68kbsd_nat(), _initialize_m88kbsd_nat(), _initialize_mips64obsd_nat(), _initialize_mips_fbsd_nat(), _initialize_mipsnbsd_nat(), _initialize_ppcfbsd_nat(), _initialize_ppcnbsd_nat(), _initialize_ppcobsd_nat(), _initialize_rs6000_nat(), _initialize_shnbsd_nat(), _initialize_spu_nat(), _initialize_vaxbsd_nat(), inf_ptrace_trad_target(), linux_target(), sparc_target(), and x86bsd_target().
|
static |
Definition at line 613 of file inf-ptrace.c.
References ptid_get_pid().
Referenced by inf_ptrace_target().
| struct target_ops* inf_ptrace_trad_target | ( | CORE_ADDR(*)(struct gdbarch *, int, int) | register_u_offset | ) |
Definition at line 829 of file inf-ptrace.c.
References gdb_assert, inf_ptrace_fetch_registers(), inf_ptrace_register_u_offset, inf_ptrace_store_registers(), inf_ptrace_target(), target_ops::to_fetch_registers, and target_ops::to_store_registers.
Referenced by linux_trad_target().
|
static |
Definition at line 379 of file inf-ptrace.c.
References _, clear_sigint_trap(), fprintf_unfiltered(), gdb_assert, gdb_stderr, inferior_ptid, target_waitstatus::kind, perror_with_name(), pid, pid_to_ptid(), ptid_get_pid(), ptrace(), PTRACE_TYPE_ARG3, target_waitstatus::related_pid, safe_strerror(), set_sigint_trap(), target_waitstatus::sig, status, store_waitstatus(), TARGET_WAITKIND_FORKED, TARGET_WAITKIND_SIGNALLED, target_waitstatus::value, and WIFSTOPPED.
Referenced by inf_ptrace_target().
|
static |
Definition at line 527 of file inf-ptrace.c.
References get_ptrace_pid(), inf_ptrace_peek_poke(), inferior_ptid, offset, pid, ptrace(), TARGET_OBJECT_AUXV, TARGET_OBJECT_MEMORY, TARGET_OBJECT_UNWIND_TABLE, TARGET_OBJECT_WCOOKIE, TARGET_XFER_E_IO, TARGET_XFER_EOF, and TARGET_XFER_OK.
Referenced by inf_ptrace_target().
Definition at line 709 of file inf-ptrace.c.
Referenced by inf_ptrace_fetch_register(), inf_ptrace_store_register(), and inf_ptrace_trad_target().
1.8.14