73 static const char *moxie_register_names[] = {
74 "$fp",
"$sp",
"$r0",
"$r1",
"$r2",
75 "$r3",
"$r4",
"$r5",
"$r6",
"$r7",
76 "$r8",
"$r9",
"$r10",
"$r11",
"$r12",
77 "$r13",
"$pc",
"$cc" };
88 return moxie_register_names[reg_nr];
148 if (start_addr >= end_addr)
151 for (next_addr = start_addr; next_addr < end_addr; )
156 if (inst >= 0x0612 && inst <= 0x061f)
181 return (next_addr + 8);
183 else if ((inst & 0xff00) == 0x9100)
188 while (next_addr < end_addr)
191 if ((inst & 0xff00) != 0x9100)
207 const char *func_name;
216 if (post_prologue_pc != 0)
217 return std::max (pc, post_prologue_pc);
227 memset (&cache, 0,
sizeof cache);
238 if (sal.
end && sal.
end < func_end)
277 int length,
enum bfd_endian byte_order)
283 "addr 0x%s len = %d.\n"),
294 #define INST2OFFSET(o) ((((signed short)((o & ((1<<10)-1))<<6))>>6)<<1) 298 static std::vector<CORE_ADDR>
308 std::vector<CORE_ADDR> next_pcs;
315 if (inst & (1 << 15))
317 if (inst & (1 << 14))
320 int opcode = (inst >> 10 & 0xf);
336 next_pcs.push_back (addr + 2);
349 next_pcs.push_back (addr + 2);
355 int opcode = inst >> 8;
396 next_pcs.push_back (addr + 2);
406 next_pcs.push_back (addr + 4);
419 next_pcs.push_back (addr + 6);
437 (inst >> 4) & 0xf, (
gdb_byte *) & tmpu32);
438 next_pcs.push_back (tmpu32);
517 if (writebuf != NULL)
559 if (cache->
base == 0)
592 void **this_prologue_cache,
struct frame_id *this_id)
595 this_prologue_cache);
598 if (cache->
base == 0)
606 static struct value *
608 void **this_prologue_cache,
int regnum)
611 this_prologue_cache);
681 if (inst & (1 << 15))
683 if (inst & (1 << 14))
686 int opcode = (inst >> 10 & 0xf);
712 int opcode = (inst >> 12 & 0x3);
719 int reg = (inst >> 8) & 0xf;
739 int opcode = inst >> 8;
749 int reg = (inst >> 4) & 0xf;
777 int reg = (inst >> 4) & 0xf;
784 int reg = (inst >> 4) & 0xf;
795 int a = (inst >> 4) & 0xf;
804 int reg = (inst >> 4) & 0xf;
819 int reg = (inst >> 4) & 0xf;
826 int reg = (inst >> 4) & 0xf;
836 int reg = (inst >> 4) & 0xf;
843 int reg = (inst >> 4) & 0xf;
845 byte_order)) << 16 ) >> 16;
872 int reg = (inst >> 4) & 0xf;
906 int reg = (inst >> 4) & 0xf;
913 int reg = (inst >> 4) & 0xf;
932 int reg = (inst >> 4) & 0xf;
939 int reg = (inst >> 4) & 0xf;
970 int reg = (inst >> 4) & 0xf;
997 uint32_t length, ptr;
1031 int reg = (inst >> 4) & 0xf;
1041 int reg = (inst >> 4) & 0xf;
1048 int reg = (inst >> 4) & 0xf;
1050 byte_order)) << 16 ) >> 16;
1061 int reg = (inst >> 4) & 0xf;
1068 int reg = (inst >> 4) & 0xf;
1070 byte_order)) << 16 ) >> 16;
1127 moxie_breakpoint::kind_from_pc);
1129 moxie_breakpoint::bp_from_kind);
struct gdbarch * target_gdbarch(void)
void set_gdbarch_num_regs(struct gdbarch *gdbarch, int num_regs)
void set_gdbarch_frame_align(struct gdbarch *gdbarch, gdbarch_frame_align_ftype frame_align)
CORE_ADDR saved_regs[MOXIE_NUM_REGS]
static struct frame_id moxie_dummy_id(struct gdbarch *gdbarch, struct frame_info *this_frame)
struct frame_id frame_id_build(CORE_ADDR stack_addr, CORE_ADDR code_addr)
static CORE_ADDR moxie_read_pc(struct regcache *regcache)
struct type * builtin_func_ptr
CORE_ADDR get_frame_pc(struct frame_info *frame)
static CORE_ADDR moxie_skip_prologue(struct gdbarch *gdbarch, CORE_ADDR pc)
void gdbarch_init_osabi(struct gdbarch_info info, struct gdbarch *gdbarch)
static CORE_ADDR moxie_unwind_sp(struct gdbarch *gdbarch, struct frame_info *next_frame)
void set_gdbarch_wchar_bit(struct gdbarch *gdbarch, int wchar_bit)
int record_full_arch_list_add_reg(struct regcache *regcache, int regnum)
struct value * frame_unwind_got_memory(struct frame_info *frame, int regnum, CORE_ADDR addr)
static const struct frame_base moxie_frame_base
void set_gdbarch_overlay_update(struct gdbarch *gdbarch, gdbarch_overlay_update_ftype overlay_update)
void set_gdbarch_write_pc(struct gdbarch *gdbarch, gdbarch_write_pc_ftype write_pc)
static void moxie_frame_this_id(struct frame_info *this_frame, void **this_prologue_cache, struct frame_id *this_id)
static CORE_ADDR moxie_frame_align(struct gdbarch *gdbarch, CORE_ADDR sp)
ULONGEST frame_unwind_register_unsigned(struct frame_info *frame, int regnum)
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
void * memset(T *s, int c, size_t n)=delete
unsigned int record_debug
static CORE_ADDR moxie_unwind_pc(struct gdbarch *gdbarch, struct frame_info *next_frame)
static enum return_value_convention moxie_return_value(struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
struct gdbarch_list * gdbarch_list_lookup_by_info(struct gdbarch_list *arches, const struct gdbarch_info *info)
CORE_ADDR skip_prologue_using_sal(struct gdbarch *gdbarch, CORE_ADDR func_addr)
struct block_symbol lookup_symbol(const char *name, const struct block *block, domain_enum domain, struct field_of_this_result *is_a_field_of_this)
static const char * moxie_register_name(struct gdbarch *gdbarch, int reg_nr)
void frame_unwind_append_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
void set_gdbarch_process_record(struct gdbarch *gdbarch, gdbarch_process_record_ftype process_record)
struct type * builtin_int32
void set_gdbarch_wchar_signed(struct gdbarch *gdbarch, int wchar_signed)
#define FRAME_OBSTACK_ZALLOC(TYPE)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
struct value * frame_unwind_got_constant(struct frame_info *frame, int regnum, ULONGEST val)
static std::vector< CORE_ADDR > moxie_software_single_step(struct regcache *regcache)
void frame_base_set_default(struct gdbarch *gdbarch, const struct frame_base *default_base)
void set_gdbarch_register_type(struct gdbarch *gdbarch, gdbarch_register_type_ftype register_type)
LONGEST read_memory_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
struct symtab_and_line find_pc_line(CORE_ADDR pc, int notcurrent)
static int moxie_process_record(struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
static const struct frame_unwind moxie_frame_unwind
static ULONGEST extract_unsigned_integer(const gdb_byte *addr, int len, enum bfd_endian byte_order)
enum register_status regcache_cooked_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
void set_gdbarch_sp_regnum(struct gdbarch *gdbarch, int sp_regnum)
void set_gdbarch_dummy_id(struct gdbarch *gdbarch, gdbarch_dummy_id_ftype dummy_id)
void fprintf_unfiltered(struct ui_file *stream, const char *format,...)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
static struct value * moxie_frame_prev_register(struct frame_info *this_frame, void **this_prologue_cache, int regnum)
int find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr)
void set_gdbarch_unwind_pc(struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype unwind_pc)
int default_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
static CORE_ADDR moxie_frame_base_address(struct frame_info *this_frame, void **this_cache)
void set_gdbarch_read_pc(struct gdbarch *gdbarch, gdbarch_read_pc_ftype read_pc)
void simple_overlay_update(struct obj_section *osect)
void set_gdbarch_unwind_sp(struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype unwind_sp)
static struct moxie_frame_cache * moxie_frame_cache(struct frame_info *this_frame, void **this_cache)
void printf_unfiltered(const char *format,...)
static struct gdbarch * moxie_gdbarch_init(struct gdbarch_info info, struct gdbarch_list *arches)
typedef BP_MANIPULATION(moxie_break_insn)
ULONGEST get_frame_register_unsigned(struct frame_info *frame, int regnum)
static void moxie_extract_return_value(struct type *type, struct regcache *regcache, gdb_byte *dst)
static struct type * moxie_register_type(struct gdbarch *gdbarch, int reg_nr)
void set_gdbarch_breakpoint_kind_from_pc(struct gdbarch *gdbarch, gdbarch_breakpoint_kind_from_pc_ftype breakpoint_kind_from_pc)
int record_full_arch_list_add_mem(CORE_ADDR addr, int len)
void set_gdbarch_software_single_step(struct gdbarch *gdbarch, gdbarch_software_single_step_ftype software_single_step)
static CORE_ADDR moxie_analyze_prologue(CORE_ADDR start_addr, CORE_ADDR end_addr, struct moxie_frame_cache *cache, struct gdbarch *gdbarch)
int core_addr_lessthan(CORE_ADDR lhs, CORE_ADDR rhs)
enum register_status regcache_raw_read(struct regcache *regcache, int regnum, gdb_byte *buf)
struct value * frame_unwind_got_register(struct frame_info *frame, int regnum, int new_regnum)
void regcache_cooked_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
CORE_ADDR regcache_read_pc(struct regcache *regcache)
struct type * builtin_data_ptr
constexpr gdb_byte moxie_break_insn[]
#define SYMBOL_LANGUAGE(symbol)
unsigned long long ULONGEST
enum unwind_stop_reason default_frame_unwind_stop_reason(struct frame_info *this_frame, void **this_cache)
struct trad_frame_saved_reg * saved_regs
void _initialize_moxie_tdep(void)
void set_gdbarch_return_value(struct gdbarch *gdbarch, gdbarch_return_value_ftype return_value)
static struct moxie_frame_cache * moxie_alloc_frame_cache(void)
#define TYPE_LENGTH(thistype)
ULONGEST read_memory_unsigned_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
void set_gdbarch_sw_breakpoint_from_kind(struct gdbarch *gdbarch, gdbarch_sw_breakpoint_from_kind_ftype sw_breakpoint_from_kind)
void register_gdbarch_init(enum bfd_architecture bfd_architecture, gdbarch_init_ftype *init)
void set_gdbarch_skip_prologue(struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype skip_prologue)
static void moxie_store_return_value(struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
enum bfd_endian byte_order
void set_gdbarch_pc_regnum(struct gdbarch *gdbarch, int pc_regnum)
int record_full_arch_list_add_end(void)
void set_gdbarch_register_name(struct gdbarch *gdbarch, gdbarch_register_name_ftype register_name)
CORE_ADDR get_frame_func(struct frame_info *this_frame)
struct gdbarch * gdbarch_alloc(const struct gdbarch_info *info, struct gdbarch_tdep *tdep)
void set_gdbarch_inner_than(struct gdbarch *gdbarch, gdbarch_inner_than_ftype inner_than)
static ULONGEST moxie_process_readu(CORE_ADDR addr, gdb_byte *buf, int length, enum bfd_endian byte_order)
static void moxie_write_pc(struct regcache *regcache, CORE_ADDR val)
struct gdbarch * get_frame_arch(struct frame_info *this_frame)
static void store_unsigned_integer(gdb_byte *addr, int len, enum bfd_endian byte_order, ULONGEST val)