24 #include "elf/common.h" 27 #include <asm/prctl.h> 45 #ifndef PTRACE_ARCH_PRCTL 46 #define PTRACE_ARCH_PRCTL 30 68 -1, -1, -1, -1, -1, -1, -1, -1,
69 -1, -1, -1, -1, -1, -1, -1, -1,
70 -1, -1, -1, -1, -1, -1, -1, -1, -1,
71 -1, -1, -1, -1, -1, -1, -1, -1,
74 -1, -1, -1, -1, -1, -1, -1, -1,
75 -1, -1, -1, -1, -1, -1, -1, -1,
99 elf_gregset_t *gregsetp,
int regnum)
121 elf_fpregset_t *fpregsetp,
int regnum)
159 elf_fpregset_t fpregs;
166 iov.iov_base = xstateregs;
167 iov.iov_len =
sizeof (xstateregs);
169 (
unsigned int) NT_X86_XSTATE, (
long) &iov) < 0)
181 #ifndef HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 242 elf_fpregset_t fpregs;
249 iov.iov_base = xstateregs;
250 iov.iov_len =
sizeof (xstateregs);
252 (
unsigned int) NT_X86_XSTATE, (
long) &iov) < 0)
258 (
unsigned int) NT_X86_XSTATE, (
long) &iov) < 0)
272 #ifndef HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 304 lwpid_t lwpid,
int idx,
void **base)
308 unsigned int base_addr;
317 (*base) = (
void *) (
long) base_addr;
331 #ifdef HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 338 fs =
ptrace (PTRACE_PEEKUSER, lwpid,
339 offsetof (
struct user_regs_struct, fs_base), 0);
351 #ifdef HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 355 gs =
ptrace (PTRACE_PEEKUSER, lwpid,
356 offsetof (
struct user_regs_struct, gs_base), 0);
struct gdbarch * target_gdbarch(void)
static constexpr ptid_t tid
struct frame_info * get_current_frame(void)
#define I386_LINUX_NUM_REGS
int ptid_get_pid(const ptid_t &ptid)
void amd64_collect_native_gregset(const struct regcache *regcache, void *gregs, int regnum)
void supply_fpregset(struct regcache *regcache, const elf_fpregset_t *fpregsetp)
int amd64_native_gregset32_num_regs
ptid_t regcache_get_ptid(const struct regcache *regcache)
struct target_ops * x86_linux_create_target(void)
ps_err_e x86_linux_get_thread_area(pid_t pid, void *addr, unsigned int *base_addr)
int amd64_native_gregset64_num_regs
void amd64_collect_fxsave(const struct regcache *regcache, int regnum, void *fxsave)
void amd64_supply_native_gregset(struct regcache *regcache, const void *gregs, int regnum)
int * amd64_native_gregset32_reg_offset
int amd64_linux_siginfo_fixup_common(siginfo_t *ptrace, gdb_byte *inf, int direction, enum amd64_siginfo_fixup_mode mode)
enum tribool have_ptrace_getregset
void amd64_supply_fxsave(struct regcache *regcache, int regnum, const void *fxsave)
static void amd64_linux_store_inferior_registers(struct target_ops *ops, struct regcache *regcache, int regnum)
int * amd64_native_gregset64_reg_offset
static void amd64_linux_fetch_inferior_registers(struct target_ops *ops, struct regcache *regcache, int regnum)
void amd64_supply_xsave(struct regcache *regcache, int regnum, const void *xsave)
ps_err_e ps_get_thread_area(struct ps_prochandle *ph, lwpid_t lwpid, int idx, void **base)
void fill_gregset(const struct regcache *regcache, elf_gregset_t *gregsetp, int regnum)
void _initialize_amd64_linux_nat(void)
void x86_linux_add_target(struct target_ops *t)
int amd64_linux_gregset_reg_offset[]
int gdbarch_addr_bit(struct gdbarch *gdbarch)
void fill_fpregset(const struct regcache *regcache, elf_fpregset_t *fpregsetp, int regnum)
long ptid_get_lwp(const ptid_t &ptid)
void linux_nat_set_siginfo_fixup(struct target_ops *t, int(*siginfo_fixup)(siginfo_t *, gdb_byte *, int))
#define X86_XSTATE_MAX_SIZE
static int amd64_linux_siginfo_fixup(siginfo_t *ptrace, gdb_byte *inf, int direction)
void(* to_fetch_registers)(struct target_ops *, struct regcache *, int) TARGET_DEFAULT_IGNORE()
void void void void void void void void void perror_with_name(const char *string) ATTRIBUTE_NORETURN
#define PTRACE_ARCH_PRCTL
#define AMD64_LINUX_NUM_REGS
int amd64_native_gregset_supplies_p(struct gdbarch *gdbarch, int regnum)
static int amd64_linux_gregset32_reg_offset[]
void supply_gregset(struct regcache *regcache, const elf_gregset_t *gregsetp)
void regcache_raw_supply(struct regcache *regcache, int regnum, const void *buf)
const struct bfd_arch_info * gdbarch_bfd_arch_info(struct gdbarch *gdbarch)
void regcache_raw_collect(const struct regcache *regcache, int regnum, void *buf)
void amd64_collect_xsave(const struct regcache *regcache, int regnum, void *xsave, int gcore)
void(* to_store_registers)(struct target_ops *, struct regcache *, int) TARGET_DEFAULT_NORETURN(noprocess())
struct gdbarch * get_frame_arch(struct frame_info *this_frame)