43 #define XML_SYSCALL_FILENAME_I386 "syscalls/i386-linux.xml"
105 #define LINUX_SIGTRAMP_INSN0 0x58
106 #define LINUX_SIGTRAMP_OFFSET0 0
107 #define LINUX_SIGTRAMP_INSN1 0xb8
108 #define LINUX_SIGTRAMP_OFFSET1 1
109 #define LINUX_SIGTRAMP_INSN2 0xcd
110 #define LINUX_SIGTRAMP_OFFSET2 6
119 #define LINUX_SIGTRAMP_LEN (sizeof linux_sigtramp_code)
176 #define LINUX_RT_SIGTRAMP_INSN0 0xb8
177 #define LINUX_RT_SIGTRAMP_OFFSET0 0
178 #define LINUX_RT_SIGTRAMP_INSN1 0xcd
179 #define LINUX_RT_SIGTRAMP_OFFSET1 5
187 #define LINUX_RT_SIGTRAMP_LEN (sizeof linux_rt_sigtramp_code)
242 if (name == NULL || strstr (name,
"sigaction") != NULL)
246 return (strcmp (
"__restore", name) == 0
247 || strcmp (
"__restore_rt", name) == 0);
264 if (name && (strcmp (name,
"__kernel_sigreturn") == 0
265 || strcmp (name,
"__kernel_rt_sigreturn") == 0))
272 #define I386_LINUX_UCONTEXT_SIGCONTEXT_OFFSET 20
316 error (
_(
"Couldn't recognize signal trampoline."));
379 enum { i386_syscall_max = 499 };
381 if (syscall <= i386_syscall_max)
410 "support syscall number %s\n"),
435 #define I386_LINUX_xstate 270
436 #define I386_LINUX_frame_size 732
441 enum gdb_signal signal)
543 -1, -1, -1, -1, -1, -1, -1, -1,
544 -1, -1, -1, -1, -1, -1, -1, -1,
545 -1, -1, -1, -1, -1, -1, -1, -1,
547 -1, -1, -1, -1, -1, -1, -1, -1,
550 -1, -1, -1, -1, -1, -1, -1, -1,
551 -1, -1, -1, -1, -1, -1, -1, -1,
584 asection *xstate = bfd_get_section_by_name (abfd,
".reg-xstate");
589 size_t size = bfd_section_size (abfd, xstate);
598 if (! bfd_get_section_contents (abfd, xstate, contents,
602 warning (
_(
"Couldn't read `xcr0' bytes from "
603 "`.reg-xstate' section in core file."));
607 xcr0 = bfd_get_64 (abfd, contents);
643 if (bfd_get_section_by_name (abfd,
".reg-xfp") != NULL)
654 const void *xstateregs,
size_t len)
664 int regnum,
void *xstateregs,
size_t len)
671 static const struct regset i386_linux_xstateregset =
692 &i386_linux_xstateregset,
"XSAVE extended state", cb_data);
694 cb (
".reg-xfp", 512, &
i386_fpregset,
"extended floating-point",
int i386_register_reggroup_p(struct gdbarch *gdbarch, int regnum, struct reggroup *group)
void set_gdbarch_num_regs(struct gdbarch *gdbarch, int num_regs)
#define LINUX_RT_SIGTRAMP_LEN
#define X86_XSTATE_AVX_MASK
ULONGEST extract_unsigned_integer(const gdb_byte *, int, enum bfd_endian)
static int i386_linux_sigtramp_p(struct frame_info *this_frame)
int size_serial_icounter_struct
#define LINUX_SIGTRAMP_LEN
void set_gdbarch_displaced_step_fixup(struct gdbarch *gdbarch, gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
CORE_ADDR get_frame_pc(struct frame_info *frame)
#define X86_XSTATE_SSE_MASK
#define I386_LINUX_UCONTEXT_SIGCONTEXT_OFFSET
void set_gdbarch_fetch_tls_load_module_address(struct gdbarch *gdbarch, gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
#define I386_LINUX_NUM_REGS
int i386_process_record(struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR input_addr)
struct regcache * get_thread_regcache(ptid_t ptid)
uint64_t i386_linux_core_read_xcr0(bfd *abfd)
int(* i386_intx80_record)(struct regcache *regcache)
static struct linux_record_tdep i386_linux_record_tdep
int record_full_arch_list_add_reg(struct regcache *regcache, int regnum)
#define X86_XSTATE_MPX_MASK
struct gdbarch * get_regcache_arch(const struct regcache *regcache)
int gdbarch_int_bit(struct gdbarch *gdbarch)
#define LINUX_SIGTRAMP_INSN0
void set_gdbarch_skip_trampoline_code(struct gdbarch *gdbarch, gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
void warning(const char *fmt,...)
CORE_ADDR glibc_skip_solib_resolver(struct gdbarch *gdbarch, CORE_ADDR pc)
void set_gdbarch_write_pc(struct gdbarch *gdbarch, gdbarch_write_pc_ftype write_pc)
void set_gdbarch_displaced_step_location(struct gdbarch *gdbarch, gdbarch_displaced_step_location_ftype displaced_step_location)
int gdbarch_ptr_bit(struct gdbarch *gdbarch)
#define LINUX_RT_SIGTRAMP_INSN1
char * plongest(LONGEST l)
int ioctl_TIOCSERGETMULTI
const struct regset i386_fpregset
void set_gdbarch_process_record_signal(struct gdbarch *gdbarch, gdbarch_process_record_signal_ftype process_record_signal)
int(* i386_syscall_record)(struct regcache *regcache)
struct displaced_step_closure * i386_displaced_step_copy_insn(struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
void linux_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
CORE_ADDR(* sigcontext_addr)(struct frame_info *)
static CORE_ADDR i386_linux_rt_sigtramp_start(struct frame_info *this_frame)
int gdbarch_long_bit(struct gdbarch *gdbarch)
struct link_map_offsets * svr4_ilp32_fetch_link_map_offsets(void)
struct reggroup *const restore_reggroup
void dwarf2_frame_set_signal_frame_p(struct gdbarch *gdbarch, int(*signal_frame_p)(struct gdbarch *, struct frame_info *))
static CORE_ADDR i386_linux_sigcontext_addr(struct frame_info *this_frame)
static int i386_linux_register_reggroup_p(struct gdbarch *gdbarch, int regnum, struct reggroup *group)
struct gdbarch_tdep_info * tdep_info
void i386_displaced_step_fixup(struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
struct gdbarch_tdep * gdbarch_tdep(struct gdbarch *gdbarch)
void set_gdbarch_process_record(struct gdbarch *gdbarch, gdbarch_process_record_ftype process_record)
#define X86_XSTATE_SIZE(XCR0)
static LONGEST i386_linux_get_syscall_number_from_regcache(struct regcache *regcache)
CORE_ADDR svr4_fetch_objfile_link_map(struct objfile *objfile)
static const struct target_desc * i386_linux_core_read_description(struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd)
int(* i386_sysenter_record)(struct regcache *regcache)
int ioctl_TIOCSERSETMULTI
int tdesc_numbered_register(const struct tdesc_feature *feature, struct tdesc_arch_data *data, int regno, const char *name)
struct target_desc * tdesc_i386_avx512_linux
#define I386_LINUX_frame_size
static int i386_linux_record_signal(struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal)
static int i386_all_but_ip_registers_record(struct regcache *regcache)
int record_linux_system_call(enum gdb_syscall syscall, struct regcache *regcache, struct linux_record_tdep *tdep)
CORE_ADDR find_solib_trampoline_target(struct frame_info *frame, CORE_ADDR pc)
int safe_frame_unwind_memory(struct frame_info *this_frame, CORE_ADDR addr, gdb_byte *buf, int len)
struct reggroup *const system_reggroup
static void i386_linux_iterate_over_regset_sections(struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
static LONGEST i386_linux_get_syscall_number(struct gdbarch *gdbarch, ptid_t ptid)
#define LINUX_SIGTRAMP_OFFSET1
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
static void i386_linux_supply_xstateregset(const struct regset *regset, struct regcache *regcache, int regnum, const void *xstateregs, size_t len)
static void i386_linux_write_pc(struct regcache *regcache, CORE_ADDR pc)
void set_solib_svr4_fetch_link_map_offsets(struct gdbarch *gdbarch, struct link_map_offsets *(*flmo)(void))
static void initialize_tdesc_i386_avx_linux(void)
int find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr)
#define LINUX_SIGTRAMP_INSN1
#define LINUX_RT_SIGTRAMP_OFFSET1
#define I386_LINUX_xstate
const void * register_reggroup_p
#define X86_XSTATE_MPX_AVX512_MASK
const struct regset i386_gregset
enum register_status regcache_raw_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
void set_xml_syscall_file_name(struct gdbarch *gdbarch, const char *name)
void printf_unfiltered(const char *format,...)
void read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
void( iterate_over_regset_sections_cb)(const char *sect_name, int size, const struct regset *regset, const char *human_name, void *cb_data)
static CORE_ADDR i386_linux_sigtramp_start(struct frame_info *this_frame)
CORE_ADDR linux_displaced_step_location(struct gdbarch *gdbarch)
static void initialize_tdesc_i386_linux(void)
#define LINUX_SIGTRAMP_OFFSET2
void set_gdbarch_sofun_address_maybe_missing(struct gdbarch *gdbarch, int sofun_address_maybe_missing)
static void i386_linux_collect_xstateregset(const struct regset *regset, const struct regcache *regcache, int regnum, void *xstateregs, size_t len)
int record_full_arch_list_add_mem(CORE_ADDR addr, int len)
const struct target_desc * target_desc
void i387_collect_xsave(const struct regcache *regcache, int regnum, void *xsave, int gcore)
static const gdb_byte linux_rt_sigtramp_code[]
#define X86_XSTATE_X87_MASK
static int i386_linux_sc_reg_offset[]
static int i386_linux_dwarf_signal_frame_p(struct gdbarch *gdbarch, struct frame_info *this_frame)
int(* sigtramp_p)(struct frame_info *)
void set_gdbarch_displaced_step_copy_insn(struct gdbarch *gdbarch, gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
#define X86_XSTATE_AVX512_MASK
#define I386_LINUX_ORIG_EAX_REGNUM
struct target_desc * tdesc_i386_mpx_linux
#define X86_XSTATE_AVX_SIZE
static void initialize_tdesc_i386_mmx_linux(void)
void regcache_cooked_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
void i386_elf_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
void set_gdbarch_get_syscall_number(struct gdbarch *gdbarch, gdbarch_get_syscall_number_ftype get_syscall_number)
static void initialize_tdesc_i386_mpx_linux(void)
static enum gdb_syscall i386_canonicalize_syscall(int syscall)
void get_frame_register(struct frame_info *frame, int regnum, gdb_byte *buf)
enum register_status regcache_cooked_read(struct regcache *regcache, int regnum, gdb_byte *buf)
#define LINUX_SIGTRAMP_INSN2
static void i386_linux_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
const struct target_desc * tdesc
struct target_desc * tdesc_i386_mmx_linux
unsigned long long ULONGEST
int i386_linux_gregset_reg_offset[]
const struct tdesc_feature * tdesc_find_feature(const struct target_desc *target_desc, const char *name)
#define LINUX_RT_SIGTRAMP_INSN0
#define XML_SYSCALL_FILENAME_I386
static int i386_linux_intx80_sysenter_syscall_record(struct regcache *regcache)
void set_gdbarch_displaced_step_free_closure(struct gdbarch *gdbarch, gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure)
static struct displaced_step_closure * i386_linux_displaced_step_copy_insn(struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
int size_hayes_esp_config
struct reggroup *const save_reggroup
struct target_desc * tdesc_i386_linux
void _initialize_i386_linux_tdep(void)
#define I386_LINUX_XSAVE_XCR0_OFFSET
void set_gdbarch_iterate_over_regset_sections(struct gdbarch *gdbarch, gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections)
LONGEST extract_signed_integer(const gdb_byte *, int, enum bfd_endian)
int size__old_kernel_stat
static struct gdbarch_data * tdesc_data
void i387_supply_xsave(struct regcache *regcache, int regnum, const void *xsave)
void set_gdbarch_skip_solib_resolver(struct gdbarch *gdbarch, gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
static const gdb_byte linux_sigtramp_code[]
enum bfd_endian byte_order
struct target_desc * tdesc_i386_avx_linux
static void initialize_tdesc_i386_avx512_linux(void)
int record_full_arch_list_add_end(void)
void set_gdbarch_core_read_description(struct gdbarch *gdbarch, gdbarch_core_read_description_ftype core_read_description)
int tdesc_has_registers(const struct target_desc *target_desc)
void gdbarch_register_osabi(enum bfd_architecture arch, unsigned long machine, enum gdb_osabi osabi, void(*init_osabi)(struct gdbarch_info, struct gdbarch *))
void error(const char *fmt,...)
struct gdbarch * get_frame_arch(struct frame_info *this_frame)
const ULONGEST const LONGEST len
void simple_displaced_step_free_closure(struct gdbarch *gdbarch, struct displaced_step_closure *closure)
enum register_status regcache_raw_read_signed(struct regcache *regcache, int regnum, LONGEST *val)
#define X86_XSTATE_ALL_MASK