GDB (xrefs)
|
#include "defs.h"
#include "inferior.h"
#include "gdbcore.h"
#include "regcache.h"
#include "elf/common.h"
#include <sys/ptrace.h>
#include <sys/uio.h>
#include "gregset.h"
#include "gdb_proc_service.h"
#include "i386-linux-nat.h"
#include "i387-tdep.h"
#include "i386-tdep.h"
#include "i386-linux-tdep.h"
#include "x86-xstate.h"
#include "linux-nat.h"
#include "x86-linux-nat.h"
#include "nat/linux-ptrace.h"
Go to the source code of this file.
Macros | |
#define | GETREGS_SUPPLIES(regno) ((0 <= (regno) && (regno) <= 15) || (regno) == I386_LINUX_ORIG_EAX_REGNUM) |
#define | GETFPXREGS_SUPPLIES(regno) (I386_ST0_REGNUM <= (regno) && (regno) < I386_SSE_NUM_REGS) |
#define | GETXSTATEREGS_SUPPLIES(regno) (I386_ST0_REGNUM <= (regno) && (regno) < I386_AVX512_NUM_REGS) |
#define | LINUX_SYSCALL_LEN (sizeof linux_syscall) |
#define | LINUX_SYSCALL_REGNUM I386_EAX_REGNUM |
#define | SYS_sigreturn 0x77 |
#define | SYS_rt_sigreturn 0xad |
#define | LINUX_SIGCONTEXT_EFLAGS_OFFSET (64) |
Variables | |
int | have_ptrace_getregs |
int | have_ptrace_getfpxregs |
static const unsigned char | linux_syscall [] = { 0xcd, 0x80 } |
initialize_file_ftype | _initialize_i386_linux_nat |
#define GETFPXREGS_SUPPLIES | ( | regno | ) | (I386_ST0_REGNUM <= (regno) && (regno) < I386_SSE_NUM_REGS) |
Definition at line 58 of file i386-linux-nat.c.
Referenced by i386_linux_fetch_inferior_registers(), and i386_linux_store_inferior_registers().
#define GETREGS_SUPPLIES | ( | regno | ) | ((0 <= (regno) && (regno) <= 15) || (regno) == I386_LINUX_ORIG_EAX_REGNUM) |
Definition at line 55 of file i386-linux-nat.c.
Referenced by i386_linux_fetch_inferior_registers(), and i386_linux_store_inferior_registers().
#define GETXSTATEREGS_SUPPLIES | ( | regno | ) | (I386_ST0_REGNUM <= (regno) && (regno) < I386_AVX512_NUM_REGS) |
Definition at line 61 of file i386-linux-nat.c.
Referenced by i386_linux_fetch_inferior_registers(), and i386_linux_store_inferior_registers().
#define LINUX_SIGCONTEXT_EFLAGS_OFFSET (64) |
Definition at line 643 of file i386-linux-nat.c.
Referenced by i386_linux_resume().
#define LINUX_SYSCALL_LEN (sizeof linux_syscall) |
Definition at line 627 of file i386-linux-nat.c.
Referenced by i386_linux_resume().
#define LINUX_SYSCALL_REGNUM I386_EAX_REGNUM |
Definition at line 630 of file i386-linux-nat.c.
Referenced by i386_linux_resume().
#define SYS_rt_sigreturn 0xad |
Definition at line 639 of file i386-linux-nat.c.
Referenced by i386_linux_resume().
#define SYS_sigreturn 0x77 |
Definition at line 636 of file i386-linux-nat.c.
Referenced by i386_linux_resume(), and init_syscall_table().
void _initialize_i386_linux_nat | ( | void | ) |
Definition at line 722 of file i386-linux-nat.c.
References i386_linux_fetch_inferior_registers(), i386_linux_resume(), i386_linux_store_inferior_registers(), target_ops::to_fetch_registers, target_ops::to_resume, target_ops::to_store_registers, x86_linux_add_target(), and x86_linux_create_target().
Definition at line 276 of file i386-linux-nat.c.
References _, perror_with_name(), ptrace(), PTRACE_GETFPREGS, and supply_fpregset().
Referenced by i386_linux_fetch_inferior_registers().
Definition at line 378 of file i386-linux-nat.c.
References _, have_ptrace_getfpxregs, i387_supply_fxsave(), perror_with_name(), and ptrace().
Referenced by i386_linux_fetch_inferior_registers().
Definition at line 95 of file i386-linux-nat.c.
References _, error(), gdb_assert, gdbarch_register_name(), get_regcache_arch(), have_ptrace_getregs, i386_linux_gregset_reg_offset, inferior_ptid, ptid_get_lwp(), ptid_get_pid(), ptrace(), regcache_raw_supply(), and safe_strerror().
Referenced by i386_linux_fetch_inferior_registers().
Definition at line 202 of file i386-linux-nat.c.
References _, have_ptrace_getregs, perror_with_name(), ptrace(), PTRACE_GETREGS, gdbarch_tdep::regs, and supply_gregset().
Referenced by i386_linux_fetch_inferior_registers().
Definition at line 325 of file i386-linux-nat.c.
References _, have_ptrace_getregset, i387_supply_xsave(), perror_with_name(), ptrace(), PTRACE_GETREGSET, TRIBOOL_TRUE, and X86_XSTATE_MAX_SIZE.
Referenced by i386_linux_fetch_inferior_registers().
Definition at line 264 of file i386-linux-nat.c.
References i387_collect_fsave().
Referenced by store_fpregs().
Definition at line 178 of file i386-linux-nat.c.
References gdbarch_num_regs(), get_regcache_arch(), i386_linux_gregset_reg_offset, I386_LINUX_ORIG_EAX_REGNUM, I386_NUM_GREGS, and regcache_raw_collect().
Referenced by store_regs().
|
static |
Definition at line 455 of file i386-linux-nat.c.
References _, fetch_fpregs(), fetch_fpxregs(), fetch_register(), fetch_regs(), fetch_xstateregs(), gdbarch_num_regs(), get_regcache_arch(), GETFPXREGS_SUPPLIES, GETREGS_SUPPLIES, GETXSTATEREGS_SUPPLIES, have_ptrace_getregs, inferior_ptid, internal_error(), ptid_get_lwp(), and ptid_get_pid().
Referenced by _initialize_i386_linux_nat().
|
static |
Definition at line 650 of file i386-linux-nat.c.
References gdbarch::byte_order, catch_syscall_enabled(), gdb_signal_to_host(), gdbarch_byte_order(), gdbarch_pc_regnum(), get_regcache_arch(), get_thread_regcache(), I386_ESP_REGNUM, LINUX_SIGCONTEXT_EFLAGS_OFFSET, linux_syscall, LINUX_SYSCALL_LEN, LINUX_SYSCALL_REGNUM, perror_with_name(), pid, ptid_get_lwp(), ptrace(), read_memory(), read_memory_unsigned_integer(), regcache_cooked_read_unsigned(), SYS_rt_sigreturn, SYS_sigreturn, target_read_memory(), and write_memory().
Referenced by _initialize_i386_linux_nat().
|
static |
Definition at line 536 of file i386-linux-nat.c.
References _, gdbarch_num_regs(), get_regcache_arch(), GETFPXREGS_SUPPLIES, GETREGS_SUPPLIES, GETXSTATEREGS_SUPPLIES, have_ptrace_getregs, inferior_ptid, internal_error(), ptid_get_lwp(), ptid_get_pid(), store_fpregs(), store_fpxregs(), store_register(), store_regs(), and store_xstateregs().
Referenced by _initialize_i386_linux_nat().
ps_err_e ps_get_thread_area | ( | const struct ps_prochandle * | ph, |
lwpid_t | lwpid, | ||
int | idx, | ||
void ** | base | ||
) |
Definition at line 606 of file i386-linux-nat.c.
References PS_OK, and x86_linux_get_thread_area().
Definition at line 290 of file i386-linux-nat.c.
References _, fill_fpregset(), perror_with_name(), ptrace(), PTRACE_GETFPREGS, and PTRACE_SETFPREGS.
Referenced by i386_linux_store_inferior_registers().
Definition at line 405 of file i386-linux-nat.c.
References _, have_ptrace_getfpxregs, i387_collect_fxsave(), perror_with_name(), and ptrace().
Referenced by i386_linux_store_inferior_registers().
Definition at line 126 of file i386-linux-nat.c.
References _, error(), gdb_assert, gdbarch_register_name(), get_regcache_arch(), have_ptrace_getregs, i386_linux_gregset_reg_offset, inferior_ptid, ptid_get_lwp(), ptid_get_pid(), ptrace(), regcache_raw_collect(), and safe_strerror().
Referenced by i386_linux_store_inferior_registers().
Definition at line 227 of file i386-linux-nat.c.
References _, fill_gregset(), perror_with_name(), ptrace(), PTRACE_GETREGS, PTRACE_SETREGS, and gdbarch_tdep::regs.
Referenced by i386_linux_store_inferior_registers().
Definition at line 348 of file i386-linux-nat.c.
References _, have_ptrace_getregset, i387_collect_xsave(), perror_with_name(), ptrace(), PTRACE_GETREGSET, PTRACE_SETREGSET, TRIBOOL_TRUE, and X86_XSTATE_MAX_SIZE.
Referenced by i386_linux_store_inferior_registers().
Definition at line 254 of file i386-linux-nat.c.
References i387_supply_fsave().
Referenced by fetch_fpregs().
Definition at line 158 of file i386-linux-nat.c.
References gdbarch_num_regs(), get_regcache_arch(), i386_linux_gregset_reg_offset, I386_LINUX_ORIG_EAX_REGNUM, I386_NUM_GREGS, and regcache_raw_supply().
Referenced by fetch_regs().
initialize_file_ftype _initialize_i386_linux_nat |
int have_ptrace_getfpxregs |
Definition at line 81 of file i386-linux-nat.c.
Referenced by fetch_fpxregs(), store_fpxregs(), and x86_linux_read_description().
int have_ptrace_getregs |
Definition at line 65 of file i386-linux-nat.c.
Referenced by fetch_register(), fetch_regs(), i386_linux_fetch_inferior_registers(), i386_linux_store_inferior_registers(), and store_register().
|
static |
Definition at line 625 of file i386-linux-nat.c.
Referenced by i386_linux_resume().