75 return addr & 0x7fffffff
L;
81 return (ptr & 0x7fffffffL) | 0x80000000
L;
129 "r0",
"r1",
"r2",
"r3",
"r4",
130 "r5",
"r6",
"r7",
"r8",
"r9",
131 "r10",
"r11",
"r12",
"r13",
"r14",
132 "r15",
"r16",
"r17",
"r18",
"r19",
133 "r20",
"r21",
"r22",
"r23",
"r24",
134 "r25",
"r26",
"r27",
"r28",
"r29",
146 #define INSN_IS_ADDIU(X) (((X) & 0xfc000000) == 0x24000000) 147 #define ADDIU_REG_SRC(X) (((X) & 0x03e00000) >> 21) 148 #define ADDIU_REG_TGT(X) (((X) & 0x001f0000) >> 16) 149 #define ADDIU_IMMEDIATE(X) ((signed short) ((X) & 0x0000ffff)) 152 #define INSN_IS_MOVE(X) (((X) & 0xffe007ff) == 0x00000025) 153 #define MOVE_REG_SRC(X) (((X) & 0x001f0000) >> 16) 154 #define MOVE_REG_TGT(X) (((X) & 0x0000f800) >> 11) 157 #define INSN_IS_STORE_WORD(X) (((X) & 0xfc000000) == 0xac000000) 158 #define SW_REG_INDEX(X) (((X) & 0x03e00000) >> 21) 159 #define SW_REG_SRC(X) (((X) & 0x001f0000) >> 16) 160 #define SW_OFFSET(X) ((signed short) ((X) & 0x0000ffff)) 177 if (sal.
pc == 0 || sal.
line == 0 || sal.
end == 0)
186 while (sal.
pc && sal.
pc <
end);
215 loop_end = scan_start + 100;
216 sal.
end = sal.
pc = 0;
233 for (srcreg = 0; srcreg <
E_NUM_REGS; srcreg ++)
238 for (
pc = scan_start;
pc < loop_end;
pc += 4)
243 if ((insn & 0xffe00000) == 0xac200000)
247 tgtreg = ((insn >> 16) & 0x1f);
249 cache->
saved_regs[tgtreg] = -((
signed short) (insn & 0xffff));
254 if ((insn & 0xffff8000) == 0x20218000)
258 cache->
framesize = -((
signed short) (insn & 0xffff));
304 if (fi && sal.
end && (
pc < sal.
end))
348 if (sal.end && sal.end < func_end)
394 static struct value *
422 if (cache->
base == 0)
475 if ((*pcptr & 3) != 0)
476 error (
_(
"breakpoint_from_pc: invalid breakpoint address 0x%lx"),
485 static const unsigned char big_breakpoint[] = { 0x00, 0x00, 0x00, 0x0d };
509 int size = len % 4 ?: 4;
512 memcpy (buf + 4 -
size, valbuf,
size);
515 valbuf = ((
char *) valbuf) +
size;
560 int size = len % 4 ?: 4;
608 return ((sp + 7) & ~7);
654 int i, argreg, typelen, slacklen;
691 stackspace = ((stackspace + 7) & ~7);
705 stackspace += ((typelen + 7) & ~7);
726 for (i = 0; i < nargs; i++)
734 slacklen = (4 - (typelen % 4)) % 4;
735 memset (buf, 0,
sizeof (buf));
736 memcpy (buf + slacklen, val, typelen);
766 stackspace = ((stackspace + 7) & ~7);
776 struct_ptr -= ((typelen + 7) & ~7);
void set_gdbarch_num_regs(struct gdbarch *gdbarch, int num_regs)
void set_gdbarch_double_bit(struct gdbarch *gdbarch, int double_bit)
void set_gdbarch_frame_align(struct gdbarch *gdbarch, gdbarch_frame_align_ftype frame_align)
static CORE_ADDR iq2000_unwind_pc(struct gdbarch *gdbarch, struct frame_info *next_frame)
void set_gdbarch_float_format(struct gdbarch *gdbarch, const struct floatformat **float_format)
static int iq2000_pass_8bytetype_by_address(struct type *type)
static int iq2000_use_struct_convention(struct type *type)
static struct symtab_and_line find_last_line_symbol(CORE_ADDR start, CORE_ADDR end, int notcurrent)
struct frame_id frame_id_build(CORE_ADDR stack_addr, CORE_ADDR code_addr)
void set_gdbarch_float_bit(struct gdbarch *gdbarch, int float_bit)
CORE_ADDR get_frame_pc(struct frame_info *frame)
static struct type * iq2000_register_type(struct gdbarch *gdbarch, int regnum)
static void iq2000_extract_return_value(struct type *type, struct regcache *regcache, gdb_byte *valbuf)
static struct frame_id iq2000_dummy_id(struct gdbarch *gdbarch, struct frame_info *this_frame)
void gdbarch_init_osabi(struct gdbarch_info info, struct gdbarch *gdbarch)
const struct floatformat * floatformats_ieee_double[BFD_ENDIAN_UNKNOWN]
#define INSN_IS_STORE_WORD(X)
struct value * frame_unwind_got_memory(struct frame_info *frame, int regnum, CORE_ADDR addr)
ULONGEST frame_unwind_register_unsigned(struct frame_info *frame, int regnum)
void set_gdbarch_short_bit(struct gdbarch *gdbarch, int short_bit)
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
static const char * iq2000_register_name(struct gdbarch *gdbarch, int regnum)
void * memset(T *s, int c, size_t n)=delete
static struct value * iq2000_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
constexpr gdb_byte little_breakpoint[]
static CORE_ADDR iq2000_frame_align(struct gdbarch *ignore, CORE_ADDR sp)
struct gdbarch_list * gdbarch_list_lookup_by_info(struct gdbarch_list *arches, const struct gdbarch_info *info)
static const gdb_byte * iq2000_sw_breakpoint_from_kind(struct gdbarch *gdbarch, int kind, int *size)
static CORE_ADDR iq2000_frame_base_address(struct frame_info *this_frame, void **this_cache)
static CORE_ADDR iq2000_pointer_to_address(struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
static CORE_ADDR iq2000_scan_prologue(struct gdbarch *gdbarch, CORE_ADDR scan_start, CORE_ADDR scan_end, struct frame_info *fi, struct iq2000_frame_cache *cache)
CORE_ADDR saved_regs[E_NUM_REGS]
void frame_unwind_append_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
struct type * builtin_int32
#define FRAME_OBSTACK_ZALLOC(TYPE)
#define TYPE_CODE_SPACE(t)
struct value * frame_unwind_got_constant(struct frame_info *frame, int regnum, ULONGEST val)
static CORE_ADDR iq2000_skip_prologue(struct gdbarch *gdbarch, CORE_ADDR pc)
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)
const gdb_byte * value_contents(struct value *value)
struct symtab_and_line find_pc_line(CORE_ADDR pc, int notcurrent)
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 _initialize_iq2000_tdep(void)
void set_gdbarch_address_to_pointer(struct gdbarch *gdbarch, gdbarch_address_to_pointer_ftype address_to_pointer)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
static enum return_value_convention iq2000_return_value(struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
static CORE_ADDR insn_ptr_from_addr(CORE_ADDR addr)
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)
void set_gdbarch_pointer_to_address(struct gdbarch *gdbarch, gdbarch_pointer_to_address_ftype pointer_to_address)
static CORE_ADDR iq2000_unwind_sp(struct gdbarch *gdbarch, struct frame_info *next_frame)
void set_gdbarch_unwind_sp(struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype unwind_sp)
static CORE_ADDR insn_addr_from_ptr(CORE_ADDR ptr)
static struct iq2000_frame_cache * iq2000_frame_cache(struct frame_info *this_frame, void **this_cache)
#define TYPE_FIELDS(thistype)
void read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
ULONGEST get_frame_register_unsigned(struct frame_info *frame, int regnum)
void set_gdbarch_breakpoint_kind_from_pc(struct gdbarch *gdbarch, gdbarch_breakpoint_kind_from_pc_ftype breakpoint_kind_from_pc)
void set_gdbarch_frame_args_skip(struct gdbarch *gdbarch, CORE_ADDR frame_args_skip)
void set_gdbarch_long_long_bit(struct gdbarch *gdbarch, int long_long_bit)
static void iq2000_init_frame_cache(struct iq2000_frame_cache *cache)
static void iq2000_address_to_pointer(struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
const struct floatformat * floatformats_ieee_single[BFD_ENDIAN_UNKNOWN]
constexpr gdb_byte big_breakpoint[]
int core_addr_lessthan(CORE_ADDR lhs, CORE_ADDR rhs)
#define TYPE_TARGET_TYPE(thistype)
static struct gdbarch * iq2000_gdbarch_init(struct gdbarch_info info, struct gdbarch_list *arches)
static void iq2000_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
#define TYPE_CODE(thistype)
void regcache_cooked_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
struct value * frame_unwind_got_register(struct frame_info *frame, int regnum, int new_regnum)
void set_gdbarch_int_bit(struct gdbarch *gdbarch, int int_bit)
static const struct frame_unwind iq2000_frame_unwind
#define TYPE_NFIELDS(thistype)
void set_gdbarch_num_pseudo_regs(struct gdbarch *gdbarch, int num_pseudo_regs)
void dwarf2_append_unwinders(struct gdbarch *gdbarch)
void set_gdbarch_double_format(struct gdbarch *gdbarch, const struct floatformat **double_format)
unsigned long long ULONGEST
enum unwind_stop_reason default_frame_unwind_stop_reason(struct frame_info *this_frame, void **this_cache)
static void iq2000_store_return_value(struct type *type, struct regcache *regcache, const void *valbuf)
static int ignore(struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
void set_gdbarch_long_double_bit(struct gdbarch *gdbarch, int long_double_bit)
struct type * value_type(const struct value *value)
void set_gdbarch_long_bit(struct gdbarch *gdbarch, int long_bit)
void set_gdbarch_return_value(struct gdbarch *gdbarch, gdbarch_return_value_ftype return_value)
void set_gdbarch_long_double_format(struct gdbarch *gdbarch, const struct floatformat **long_double_format)
#define ADDIU_IMMEDIATE(X)
#define TYPE_LENGTH(thistype)
void set_gdbarch_ptr_bit(struct gdbarch *gdbarch, int ptr_bit)
void set_gdbarch_push_dummy_call(struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype push_dummy_call)
static int iq2000_breakpoint_kind_from_pc(struct gdbarch *gdbarch, CORE_ADDR *pcptr)
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 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)
static CORE_ADDR iq2000_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)
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)
void error(const char *fmt,...)
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 const struct frame_base iq2000_frame_base
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)
void regcache_raw_write(struct regcache *regcache, int regnum, const gdb_byte *buf)