72 static const unsigned char *
76 static unsigned char breakpoint[] = { 0x35, 0x00 };
78 *lenptr =
sizeof (breakpoint);
84 char *moxie_register_names[] = {
85 "$fp",
"$sp",
"$r0",
"$r1",
"$r2",
86 "$r3",
"$r4",
"$r5",
"$r6",
"$r7",
87 "$r8",
"$r9",
"$r10",
"$r11",
"$r12",
88 "$r13",
"$pc",
"$cc" };
99 return moxie_register_names[reg_nr];
133 len - 4, byte_order);
147 struct gdbarch *gdbarch)
160 if (start_addr >= end_addr)
163 for (next_addr = start_addr; next_addr < end_addr; )
168 if (inst >= 0x0612 && inst <= 0x061f)
170 regnum = inst & 0x000f;
193 return (next_addr + 8);
195 else if ((inst & 0xff00) == 0x9100)
200 while (next_addr < end_addr)
203 if ((inst & 0xff00) != 0x9100)
219 const char *func_name;
228 if (post_prologue_pc != 0)
229 return max (pc, post_prologue_pc);
239 memset (&cache, 0,
sizeof cache);
242 func_end, &cache, gdbarch);
250 if (sal.
end && sal.
end < func_end)
289 int length,
enum bfd_endian byte_order)
295 "addr 0x%s len = %d.\n"),
306 #define INST2OFFSET(o) ((((signed short)((o & ((1<<10)-1))<<6))>>6)<<1)
328 if (inst & (1 << 15))
330 if (inst & (1 << 14))
333 int opcode = (inst >> 10 & 0xf);
368 int opcode = inst >> 8;
455 (inst >> 4) & 0xf, (
gdb_byte *) & tmpu32);
506 bfd_byte *valbuf = dst;
537 if (writebuf != NULL)
579 if (cache->
base == 0)
612 void **this_prologue_cache,
struct frame_id *this_id)
615 this_prologue_cache);
618 if (cache->
base == 0)
626 static struct value *
628 void **this_prologue_cache,
int regnum)
631 this_prologue_cache);
669 moxie_frame_base_address
701 if (inst & (1 << 15))
703 if (inst & (1 << 14))
706 int opcode = (inst >> 10 & 0xf);
732 int opcode = (inst >> 12 & 0x3);
739 int reg = (inst >> 8) & 0xf;
759 int opcode = inst >> 8;
769 int reg = (inst >> 4) & 0xf;
797 int reg = (inst >> 4) & 0xf;
804 int reg = (inst >> 4) & 0xf;
815 int a = (inst >> 4) & 0xf;
824 int reg = (inst >> 4) & 0xf;
839 int reg = (inst >> 4) & 0xf;
846 int reg = (inst >> 4) & 0xf;
856 int reg = (inst >> 4) & 0xf;
863 int reg = (inst >> 4) & 0xf;
865 byte_order)) << 16 ) >> 16;
892 int reg = (inst >> 4) & 0xf;
926 int reg = (inst >> 4) & 0xf;
933 int reg = (inst >> 4) & 0xf;
952 int reg = (inst >> 4) & 0xf;
959 int reg = (inst >> 4) & 0xf;
990 int reg = (inst >> 4) & 0xf;
1017 uint32_t length, ptr;
1051 int reg = (inst >> 4) & 0xf;
1061 int reg = (inst >> 4) & 0xf;
1068 int reg = (inst >> 4) & 0xf;
1070 byte_order)) << 16 ) >> 16;
1081 int reg = (inst >> 4) & 0xf;
1088 int reg = (inst >> 4) & 0xf;
1090 byte_order)) << 16 ) >> 16;
1114 static struct gdbarch *
1117 struct gdbarch *gdbarch;
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]
ULONGEST extract_unsigned_integer(const gdb_byte *, int, enum bfd_endian)
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)
int record_full_arch_list_add_reg(struct regcache *regcache, int regnum)
struct gdbarch * get_regcache_arch(const struct regcache *regcache)
struct value * frame_unwind_got_memory(struct frame_info *frame, int regnum, CORE_ADDR addr)
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)
unsigned int record_debug
static CORE_ADDR moxie_unwind_pc(struct gdbarch *gdbarch, struct frame_info *next_frame)
static const unsigned char * moxie_breakpoint_from_pc(struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
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)
static void moxie_extract_return_value(struct type *type, struct regcache *regcache, void *dst)
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 address_space * get_frame_address_space(struct frame_info *frame)
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 regcache * get_current_regcache(void)
struct type * builtin_int32
#define FRAME_OBSTACK_ZALLOC(TYPE)
void store_unsigned_integer(gdb_byte *, int, enum bfd_endian, ULONGEST)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
struct value * frame_unwind_got_constant(struct frame_info *frame, int regnum, ULONGEST val)
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
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,...)
void insert_single_step_breakpoint(struct gdbarch *gdbarch, struct address_space *aspace, CORE_ADDR next_pc)
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)
void set_gdbarch_breakpoint_from_pc(struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype breakpoint_from_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)
static void moxie_store_return_value(struct type *type, struct regcache *regcache, const void *valbuf)
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 int moxie_software_single_step(struct frame_info *frame)
static struct gdbarch * moxie_gdbarch_init(struct gdbarch_info info, struct gdbarch_list *arches)
ULONGEST get_frame_register_unsigned(struct frame_info *frame, int regnum)
struct ui_file * gdb_stdlog
static struct type * moxie_register_type(struct gdbarch *gdbarch, int reg_nr)
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)
struct type * builtin_data_ptr
struct symbol * lookup_symbol(const char *name, const struct block *block, domain_enum domain, struct field_of_this_result *is_a_field_of_this)
#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 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)
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)
void set_gdbarch_print_insn(struct gdbarch *gdbarch, gdbarch_print_insn_ftype print_insn)
const ULONGEST const LONGEST len