86 gdb_byte bp_entry[] = { 0x10, 0xf1 };
101 buf[0] = bp_entry[0];
102 buf[1] = bp_entry[1];
103 buf[2] = contents_cache[2] & 0x7f;
104 buf[3] = contents_cache[3];
108 buf[0] = contents_cache[0];
109 buf[1] = contents_cache[1];
110 buf[2] = bp_entry[0];
111 buf[3] = bp_entry[1];
118 buf[0] = contents_cache[0];
119 buf[1] = contents_cache[1] & 0x7f;
120 buf[2] = bp_entry[1];
121 buf[3] = bp_entry[0];
125 buf[0] = bp_entry[1];
126 buf[1] = bp_entry[0];
127 buf[2] = contents_cache[2];
128 buf[3] = contents_cache[3];
146 buf[0] = contents_cache[0];
147 buf[1] = contents_cache[1];
148 buf[2] = contents_cache[2];
149 buf[3] = contents_cache[3];
154 if ((buf[0] & 0x80) == 0 && (buf[2] & 0x80) != 0)
159 if ((buf[3] & 0x80) == 0 && (buf[1] & 0x80) != 0)
173 0x10, 0xf1, 0x70, 0x00
176 0x00, 0x70, 0xf1, 0x10
183 if ((*pcptr & 3) == 0)
196 if ((*pcptr & 3) == 0)
203 bp = le_bp_entry + 2;
213 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
214 "r8",
"r9",
"r10",
"r11",
"r12",
"fp",
"lr",
"sp",
215 "psw",
"cbr",
"spi",
"spu",
"bpc",
"pc",
"accl",
"acch",
265 len - 4, byte_order);
276 CORE_ADDR *pl_endptr,
unsigned long *framelength)
279 unsigned long framesize;
291 for (current_pc = start_pc; current_pc < scan_limit; current_pc += 2)
304 if (current_pc & 0x02)
313 if (current_pc == scan_limit)
332 if (((insn >> 8) == 0xe4)
343 if (insn & 0x00800000)
350 after_push = current_pc + 2;
356 if ((insn & 0xf0ff) == 0x207f)
360 regno = ((insn >> 8) & 0xf);
364 if ((insn >> 8) == 0x4f)
367 int stack_adjust = (
signed char) (insn & 0xff);
374 if (stack_adjust < 0)
376 framesize -= stack_adjust;
380 after_stack_adjust = current_pc + 2;
386 after_prologue = current_pc + 2;
393 after_prologue = current_pc + 2;
397 if ((insn & 0xfff0) == 0x10f0)
399 after_prologue = current_pc;
403 if ((op1 == 0x7000) || (op1 == 0xb000) || (op1 == 0xf000))
405 after_prologue = current_pc;
411 int subop = insn & 0x0ff0;
412 if ((subop == 0x0ec0) || (subop == 0x0fc0))
414 after_prologue = current_pc;
421 *framelength = framesize;
423 if (current_pc >= scan_limit)
427 if (after_stack_adjust != 0)
432 *pl_endptr = after_stack_adjust;
434 else if (after_push != 0)
439 *pl_endptr = after_push;
447 *pl_endptr = start_pc;
452 if (after_prologue == 0)
453 after_prologue = current_pc;
464 #define DEFAULT_SEARCH_LIMIT 128
480 if (sal.
line != 0 && sal.
end <= func_end)
532 void **this_prologue_cache)
542 if ((*this_prologue_cache))
543 return (*this_prologue_cache);
546 (*this_prologue_cache) = info;
555 pc > 0 && pc < scan_limit; pc += 2)
560 if ((op & 0x80000000) == 0x80000000)
563 if ((op & 0xffff0000) == 0x8faf0000)
566 short n = op & 0xffff;
569 else if (((op >> 8) == 0xe4)
574 unsigned long n = op & 0xffffff;
579 if (pc == scan_limit)
588 if ((op & 0xf0ff) == 0x207f)
591 int regno = ((op >> 8) & 0xf);
595 else if ((op & 0xff00) == 0x4f00)
598 int n = (
signed char) (op & 0xff);
601 else if (op == 0x1d8f)
608 else if ((op & 0xfff0) == 0x10f0)
627 prev_sp = this_base + info->
size;
634 prev_sp = this_base + info->
size;
639 info->
base = this_base;
682 int stack_offset, stack_alloc;
709 for (argnum = 0, stack_alloc = 0; argnum < nargs; argnum++)
713 for (argnum = 0, stack_offset = 0; argnum < nargs; argnum++)
719 memset (valbuf, 0,
sizeof (valbuf));
783 bfd_byte *valbuf = dst;
812 if (writebuf != NULL)
831 void **this_prologue_cache,
struct frame_id *this_id)
859 static struct value *
861 void **this_prologue_cache,
int regnum)
889 m32r_frame_base_address
906 static struct gdbarch *
909 struct gdbarch *gdbarch;
static const struct frame_unwind m32r_frame_unwind
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)
ULONGEST extract_unsigned_integer(const gdb_byte *, int, enum bfd_endian)
struct frame_id frame_id_build(CORE_ADDR stack_addr, CORE_ADDR code_addr)
struct type * builtin_func_ptr
CORE_ADDR get_frame_pc(struct frame_info *frame)
static void m32r_extract_return_value(struct type *type, struct regcache *regcache, void *dst)
void gdbarch_init_osabi(struct gdbarch_info info, struct gdbarch *gdbarch)
int target_write_memory(CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
struct value * trad_frame_get_prev_register(struct frame_info *this_frame, struct trad_frame_saved_reg this_saved_regs[], int regnum)
int trad_frame_addr_p(struct trad_frame_saved_reg this_saved_regs[], int regnum)
struct gdbarch * get_regcache_arch(const struct regcache *regcache)
#define BMSYMBOL_VALUE_ADDRESS(symbol)
void trad_frame_set_value(struct trad_frame_saved_reg this_saved_regs[], int regnum, LONGEST val)
void set_gdbarch_overlay_update(struct gdbarch *gdbarch, gdbarch_overlay_update_ftype overlay_update)
static CORE_ADDR m32r_push_dummy_call(struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
ULONGEST frame_unwind_register_unsigned(struct frame_info *frame, int regnum)
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
static CORE_ADDR after_prologue(CORE_ADDR pc)
int safe_read_memory_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order, LONGEST *return_value)
#define DEFAULT_SEARCH_LIMIT
struct gdbarch_list * gdbarch_list_lookup_by_info(struct gdbarch_list *arches, const struct gdbarch_info *info)
int gdbarch_num_regs(struct gdbarch *gdbarch)
ULONGEST get_frame_memory_unsigned(struct frame_info *this_frame, CORE_ADDR addr, int len)
static const gdb_byte * m32r_breakpoint_from_pc(struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
void frame_unwind_append_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
struct type * builtin_int32
#define FRAME_OBSTACK_ZALLOC(TYPE)
void store_unsigned_integer(gdb_byte *, int, enum bfd_endian, ULONGEST)
static CORE_ADDR m32r_unwind_sp(struct gdbarch *gdbarch, struct frame_info *next_frame)
static CORE_ADDR m32r_unwind_pc(struct gdbarch *gdbarch, struct frame_info *next_frame)
static int decode_prologue(struct gdbarch *gdbarch, CORE_ADDR start_pc, CORE_ADDR scan_limit, CORE_ADDR *pl_endptr, unsigned long *framelength)
void frame_base_set_default(struct gdbarch *gdbarch, const struct frame_base *default_base)
static CORE_ADDR m32r_frame_align(struct gdbarch *gdbarch, CORE_ADDR sp)
char * m32r_register_names[]
void set_gdbarch_register_type(struct gdbarch *gdbarch, gdbarch_register_type_ftype register_type)
const gdb_byte * value_contents(struct value *value)
struct symtab_and_line find_pc_line(CORE_ADDR pc, int notcurrent)
struct gdbarch *( gdbarch_init_ftype)(struct gdbarch_info info, struct gdbarch_list *arches)
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)
static struct m32r_unwind_cache * m32r_frame_unwind_cache(struct frame_info *this_frame, void **this_prologue_cache)
static struct type * m32r_register_type(struct gdbarch *gdbarch, int reg_nr)
void set_gdbarch_dummy_id(struct gdbarch *gdbarch, gdbarch_dummy_id_ftype dummy_id)
static CORE_ADDR m32r_read_pc(struct regcache *regcache)
gdb_byte shadow_contents[BREAKPOINT_MAX]
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
int target_write_raw_memory(CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
int find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr)
static struct value * m32r_frame_prev_register(struct frame_info *this_frame, void **this_prologue_cache, int regnum)
void _initialize_m32r_tdep(void)
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)
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)
struct trad_frame_saved_reg * saved_regs
ULONGEST get_frame_register_unsigned(struct frame_info *frame, int regnum)
static CORE_ADDR m32r_skip_prologue(struct gdbarch *gdbarch, CORE_ADDR pc)
struct trad_frame_saved_reg * trad_frame_alloc_saved_regs(struct frame_info *this_frame)
gdbarch_return_value_ftype * return_value
int core_addr_lessthan(CORE_ADDR lhs, CORE_ADDR rhs)
static int m32r_memory_insert_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
void set_gdbarch_memory_insert_breakpoint(struct gdbarch *gdbarch, gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
static CORE_ADDR m32r_frame_base_address(struct frame_info *this_frame, void **this_cache)
#define TYPE_CODE(thistype)
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 minimal_symbol * minsym
void set_gdbarch_memory_remove_breakpoint(struct gdbarch *gdbarch, gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
unsigned long long ULONGEST
enum unwind_stop_reason default_frame_unwind_stop_reason(struct frame_info *this_frame, void **this_cache)
int register_size(struct gdbarch *gdbarch, int regnum)
struct type * value_type(const struct value *value)
static struct frame_id m32r_dummy_id(struct gdbarch *gdbarch, struct frame_info *this_frame)
void set_gdbarch_return_value(struct gdbarch *gdbarch, gdbarch_return_value_ftype return_value)
static gdbarch_init_ftype m32r_gdbarch_init
static int m32r_memory_remove_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
#define TYPE_LENGTH(thistype)
void set_gdbarch_push_dummy_call(struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype push_dummy_call)
ULONGEST read_memory_unsigned_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
static enum return_value_convention m32r_return_value(struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
void register_gdbarch_init(enum bfd_architecture bfd_architecture, gdbarch_init_ftype *init)
void write_memory(CORE_ADDR memaddr, const bfd_byte *myaddr, ssize_t len)
void set_gdbarch_skip_prologue(struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype skip_prologue)
CORE_ADDR value_address(const struct value *value)
struct bound_minimal_symbol lookup_minimal_symbol(const char *name, const char *sfile, struct objfile *objf)
static const char * m32r_register_name(struct gdbarch *gdbarch, int reg_nr)
enum bfd_endian byte_order
void set_gdbarch_pc_regnum(struct gdbarch *gdbarch, int pc_regnum)
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)
struct gdbarch * get_frame_arch(struct frame_info *this_frame)
static void m32r_store_return_value(struct type *type, struct regcache *regcache, const void *valbuf)
static void m32r_frame_this_id(struct frame_info *this_frame, void **this_prologue_cache, struct frame_id *this_id)
void set_gdbarch_print_insn(struct gdbarch *gdbarch, gdbarch_print_insn_ftype print_insn)
const ULONGEST const LONGEST len