35#include "gdbsupport/x86-xstate.h"
52 const gdb_byte osigreturn[] =
55 0x67, 0x00, 0x00, 0x00,
58 const gdb_byte sigreturn[] =
61 0x67, 0x00, 0x00, 0x00,
64 size_t buflen = (
sizeof sigreturn) + 1;
80 buf = (gdb_byte *) alloca ((
sizeof sigreturn) + 1);
88 if (memcmp (buf, sigreturn,
sizeof sigreturn)
89 && memcmp (buf + 1, sigreturn,
sizeof sigreturn)
90 && memcmp (buf, osigreturn,
sizeof osigreturn)
91 && memcmp (buf + 1, osigreturn,
sizeof osigreturn))
218#define AMD64OBSD_UTHREAD_RSP_OFFSET 400
222 int regnum, CORE_ADDR addr)
231 gdb_assert (
regnum >= -1);
266 int regnum, CORE_ADDR addr)
275 gdb_assert (
regnum >= -1);
315#define amd64obsd_tf_reg_offset amd64obsd_sc_reg_offset
323 CORE_ADDR
func, sp, addr;
338 if (
name && startswith (
name,
"Xintr"))
376 void **this_cache,
int regnum)
387 void **this_prologue_cache)
399 return (
name && ((strcmp (
name,
"calltrap") == 0)
400 || (strcmp (
name,
"osyscall1") == 0)
401 || (strcmp (
name,
"Xsyscall") == 0)
402 || (startswith (
name,
"Xintr"))));
410 "amd64 openbsd trap",
static struct trad_frame_cache * amd64obsd_trapframe_cache(frame_info_ptr this_frame, void **this_cache)
static struct value * amd64obsd_trapframe_prev_register(frame_info_ptr this_frame, void **this_cache, int regnum)
static const int amd64obsd_page_size
#define AMD64OBSD_UTHREAD_RSP_OFFSET
static void amd64obsd_collect_uthread(const struct regcache *regcache, int regnum, CORE_ADDR addr)
static const struct frame_unwind amd64obsd_trapframe_unwind
static int amd64obsd_trapframe_sniffer(const struct frame_unwind *self, frame_info_ptr this_frame, void **this_prologue_cache)
static void amd64obsd_trapframe_this_id(frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id)
static void amd64obsd_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
static int amd64obsd_sigtramp_p(frame_info_ptr this_frame)
int amd64obsd_r_reg_offset[]
#define amd64obsd_tf_reg_offset
static void amd64obsd_supply_uthread(struct regcache *regcache, int regnum, CORE_ADDR addr)
void _initialize_amd64obsd_tdep()
static int amd64obsd_uthread_reg_offset[]
static CORE_ADDR amd64obsd_sigcontext_addr(frame_info_ptr this_frame)
static int amd64obsd_sc_reg_offset[]
const struct target_desc * amd64_target_description(uint64_t xcr0, bool segments)
void amd64_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch, const target_desc *default_tdesc)
bool find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr, const struct block **block)
void bsd_uthread_set_collect_uthread(struct gdbarch *gdbarch, void(*collect_uthread)(const struct regcache *, int, CORE_ADDR))
void bsd_uthread_set_supply_uthread(struct gdbarch *gdbarch, void(*supply_uthread)(struct regcache *, int, CORE_ADDR))
void raw_collect(int regnum, void *buf) const override
void raw_supply(int regnum, const void *buf) override
void write_memory(CORE_ADDR memaddr, const bfd_byte *myaddr, ssize_t len)
ULONGEST read_memory_unsigned_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
void write_memory_unsigned_integer(CORE_ADDR addr, int len, enum bfd_endian byte_order, ULONGEST value)
void read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
static void store_unsigned_integer(gdb_byte *addr, int len, enum bfd_endian byte_order, ULONGEST val)
static ULONGEST extract_unsigned_integer(gdb::array_view< const gdb_byte > buf, enum bfd_endian byte_order)
const struct frame_id outer_frame_id
void frame_unwind_prepend_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
enum unwind_stop_reason default_frame_unwind_stop_reason(frame_info_ptr this_frame, void **this_cache)
ULONGEST get_frame_register_unsigned(frame_info_ptr frame, int regnum)
CORE_ADDR get_frame_pc(frame_info_ptr frame)
struct frame_id frame_id_build(CORE_ADDR stack_addr, CORE_ADDR code_addr)
struct gdbarch * get_frame_arch(frame_info_ptr this_frame)
CORE_ADDR get_frame_func(frame_info_ptr this_frame)
bool safe_frame_unwind_memory(frame_info_ptr this_frame, CORE_ADDR addr, gdb::array_view< gdb_byte > buffer)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
struct obj_section * find_pc_section(CORE_ADDR pc)
void obsd_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
void gdbarch_register_osabi(enum bfd_architecture arch, unsigned long machine, enum gdb_osabi osabi, void(*init_osabi)(struct gdbarch_info, struct gdbarch *))
void(* func)(remote_target *remote, char *)
void set_solib_svr4_fetch_link_map_offsets(struct gdbarch *gdbarch, struct link_map_offsets *(*flmo)(void))
struct link_map_offsets * svr4_lp64_fetch_link_map_offsets(void)
int(* sigtramp_p)(frame_info_ptr)
CORE_ADDR(* sigcontext_addr)(frame_info_ptr)
frame_info_ptr this_frame
struct trad_frame_cache * trad_frame_cache_zalloc(frame_info_ptr this_frame)
void trad_frame_set_reg_addr(struct trad_frame_cache *this_trad_cache, int regnum, CORE_ADDR addr)
void trad_frame_get_id(struct trad_frame_cache *this_trad_cache, struct frame_id *this_id)
void trad_frame_set_id(struct trad_frame_cache *this_trad_cache, struct frame_id this_id)
struct value * trad_frame_get_register(struct trad_frame_cache *this_trad_cache, frame_info_ptr this_frame, int regnum)