53 #include "gdb/sim-sh.h" 70 #define SH_NUM_REGS 67 113 static const char *register_names[] = {
114 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
115 "r8",
"r9",
"r10",
"r11",
"r12",
"r13",
"r14",
"r15",
116 "pc",
"pr",
"gbr",
"vbr",
"mach",
"macl",
"sr",
118 "",
"",
"",
"",
"",
"",
"",
"",
119 "",
"",
"",
"",
"",
"",
"",
"",
121 "",
"",
"",
"",
"",
"",
"",
"",
122 "",
"",
"",
"",
"",
"",
"",
"",
123 "",
"",
"",
"",
"",
"",
"",
"",
127 if (reg_nr >= (
sizeof (register_names) /
sizeof (*register_names)))
129 return register_names[reg_nr];
135 static const char *register_names[] = {
136 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
137 "r8",
"r9",
"r10",
"r11",
"r12",
"r13",
"r14",
"r15",
138 "pc",
"pr",
"gbr",
"vbr",
"mach",
"macl",
"sr",
140 "",
"",
"",
"",
"",
"",
"",
"",
141 "",
"",
"",
"",
"",
"",
"",
"",
143 "r0b0",
"r1b0",
"r2b0",
"r3b0",
"r4b0",
"r5b0",
"r6b0",
"r7b0",
144 "r0b1",
"r1b1",
"r2b1",
"r3b1",
"r4b1",
"r5b1",
"r6b1",
"r7b1" 145 "",
"",
"",
"",
"",
"",
"",
"",
149 if (reg_nr >= (
sizeof (register_names) /
sizeof (*register_names)))
151 return register_names[reg_nr];
157 static const char *register_names[] = {
158 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
159 "r8",
"r9",
"r10",
"r11",
"r12",
"r13",
"r14",
"r15",
160 "pc",
"pr",
"gbr",
"vbr",
"mach",
"macl",
"sr",
162 "fr0",
"fr1",
"fr2",
"fr3",
"fr4",
"fr5",
"fr6",
"fr7",
163 "fr8",
"fr9",
"fr10",
"fr11",
"fr12",
"fr13",
"fr14",
"fr15",
165 "r0b0",
"r1b0",
"r2b0",
"r3b0",
"r4b0",
"r5b0",
"r6b0",
"r7b0",
166 "r0b1",
"r1b1",
"r2b1",
"r3b1",
"r4b1",
"r5b1",
"r6b1",
"r7b1",
167 "",
"",
"",
"",
"",
"",
"",
"",
171 if (reg_nr >= (
sizeof (register_names) /
sizeof (*register_names)))
173 return register_names[reg_nr];
179 static const char *register_names[] = {
180 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
181 "r8",
"r9",
"r10",
"r11",
"r12",
"r13",
"r14",
"r15",
182 "pc",
"pr",
"gbr",
"vbr",
"mach",
"macl",
"sr",
184 "fr0",
"fr1",
"fr2",
"fr3",
"fr4",
"fr5",
"fr6",
"fr7",
185 "fr8",
"fr9",
"fr10",
"fr11",
"fr12",
"fr13",
"fr14",
"fr15",
187 "",
"",
"",
"",
"",
"",
"",
"",
188 "",
"",
"",
"",
"",
"",
"",
"",
189 "",
"",
"",
"",
"",
"",
"",
"",
193 if (reg_nr >= (
sizeof (register_names) /
sizeof (*register_names)))
195 return register_names[reg_nr];
201 static const char *register_names[] = {
203 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
204 "r8",
"r9",
"r10",
"r11",
"r12",
"r13",
"r14",
"r15",
206 "pc",
"pr",
"gbr",
"vbr",
"mach",
"macl",
"sr",
210 "fr0",
"fr1",
"fr2",
"fr3",
"fr4",
"fr5",
"fr6",
"fr7",
211 "fr8",
"fr9",
"fr10",
"fr11",
"fr12",
"fr13",
"fr14",
"fr15",
216 "r0b",
"r1b",
"r2b",
"r3b",
"r4b",
"r5b",
"r6b",
"r7b",
217 "r8b",
"r9b",
"r10b",
"r11b",
"r12b",
"r13b",
"r14b",
218 "machb",
"ivnb",
"prb",
"gbrb",
"maclb",
225 "ibcr",
"ibnr",
"tbr",
229 "dr0",
"dr2",
"dr4",
"dr6",
"dr8",
"dr10",
"dr12",
"dr14",
233 if (reg_nr >= (
sizeof (register_names) /
sizeof (*register_names)))
235 return register_names[reg_nr];
241 static const char *register_names[] = {
243 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
244 "r8",
"r9",
"r10",
"r11",
"r12",
"r13",
"r14",
"r15",
246 "pc",
"pr",
"gbr",
"vbr",
"mach",
"macl",
"sr",
250 "",
"",
"",
"",
"",
"",
"",
"",
251 "",
"",
"",
"",
"",
"",
"",
"",
256 "r0b",
"r1b",
"r2b",
"r3b",
"r4b",
"r5b",
"r6b",
"r7b",
257 "r8b",
"r9b",
"r10b",
"r11b",
"r12b",
"r13b",
"r14b",
258 "machb",
"ivnb",
"prb",
"gbrb",
"maclb",
265 "ibcr",
"ibnr",
"tbr",
269 "",
"",
"",
"",
"",
"",
"",
"",
273 if (reg_nr >= (
sizeof (register_names) /
sizeof (*register_names)))
275 return register_names[reg_nr];
281 static const char *register_names[] = {
282 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
283 "r8",
"r9",
"r10",
"r11",
"r12",
"r13",
"r14",
"r15",
284 "pc",
"pr",
"gbr",
"vbr",
"mach",
"macl",
"sr",
286 "a0g",
"a0",
"a1g",
"a1",
"m0",
"m1",
"x0",
"x1",
287 "y0",
"y1",
"",
"",
"",
"",
"",
"mod",
289 "rs",
"re",
"",
"",
"",
"",
"",
"",
290 "",
"",
"",
"",
"",
"",
"",
"",
291 "",
"",
"",
"",
"",
"",
"",
"",
295 if (reg_nr >= (
sizeof (register_names) /
sizeof (*register_names)))
297 return register_names[reg_nr];
303 static const char *register_names[] = {
304 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
305 "r8",
"r9",
"r10",
"r11",
"r12",
"r13",
"r14",
"r15",
306 "pc",
"pr",
"gbr",
"vbr",
"mach",
"macl",
"sr",
308 "a0g",
"a0",
"a1g",
"a1",
"m0",
"m1",
"x0",
"x1",
309 "y0",
"y1",
"",
"",
"",
"",
"",
"mod",
311 "rs",
"re",
"",
"",
"",
"",
"",
"",
312 "r0b",
"r1b",
"r2b",
"r3b",
"r4b",
"r5b",
"r6b",
"r7b",
313 "",
"",
"",
"",
"",
"",
"",
"",
314 "",
"",
"",
"",
"",
"",
"",
"",
318 if (reg_nr >= (
sizeof (register_names) /
sizeof (*register_names)))
320 return register_names[reg_nr];
326 static const char *register_names[] = {
328 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
329 "r8",
"r9",
"r10",
"r11",
"r12",
"r13",
"r14",
"r15",
331 "pc",
"pr",
"gbr",
"vbr",
"mach",
"macl",
"sr",
335 "fr0",
"fr1",
"fr2",
"fr3",
"fr4",
"fr5",
"fr6",
"fr7",
336 "fr8",
"fr9",
"fr10",
"fr11",
"fr12",
"fr13",
"fr14",
"fr15",
340 "r0b0",
"r1b0",
"r2b0",
"r3b0",
"r4b0",
"r5b0",
"r6b0",
"r7b0",
342 "r0b1",
"r1b1",
"r2b1",
"r3b1",
"r4b1",
"r5b1",
"r6b1",
"r7b1",
344 "",
"",
"",
"",
"",
"",
"",
"",
348 "dr0",
"dr2",
"dr4",
"dr6",
"dr8",
"dr10",
"dr12",
"dr14",
350 "fv0",
"fv4",
"fv8",
"fv12",
356 if (reg_nr >= (
sizeof (register_names) /
sizeof (*register_names)))
358 return register_names[reg_nr];
364 static const char *register_names[] = {
366 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
367 "r8",
"r9",
"r10",
"r11",
"r12",
"r13",
"r14",
"r15",
369 "pc",
"pr",
"gbr",
"vbr",
"mach",
"macl",
"sr",
373 "",
"",
"",
"",
"",
"",
"",
"",
374 "",
"",
"",
"",
"",
"",
"",
"",
378 "r0b0",
"r1b0",
"r2b0",
"r3b0",
"r4b0",
"r5b0",
"r6b0",
"r7b0",
380 "r0b1",
"r1b1",
"r2b1",
"r3b1",
"r4b1",
"r5b1",
"r6b1",
"r7b1",
382 "",
"",
"",
"",
"",
"",
"",
"",
386 "",
"",
"",
"",
"",
"",
"",
"",
392 if (reg_nr >= (
sizeof (register_names) /
sizeof (*register_names)))
394 return register_names[reg_nr];
400 static const char *register_names[] = {
401 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
402 "r8",
"r9",
"r10",
"r11",
"r12",
"r13",
"r14",
"r15",
403 "pc",
"pr",
"gbr",
"vbr",
"mach",
"macl",
"sr",
405 "a0g",
"a0",
"a1g",
"a1",
"m0",
"m1",
"x0",
"x1",
406 "y0",
"y1",
"",
"",
"",
"",
"",
"mod",
408 "rs",
"re",
"",
"",
"",
"",
"",
"",
409 "r0b",
"r1b",
"r2b",
"r3b",
"r4b",
"r5b",
"r6b",
"r7b",
410 "",
"",
"",
"",
"",
"",
"",
"",
411 "",
"",
"",
"",
"",
"",
"",
"",
415 if (reg_nr >= (
sizeof (register_names) /
sizeof (*register_names)))
417 return register_names[reg_nr];
438 static unsigned char big_remote_breakpoint[] = { 0xc3, 0x20 };
439 static unsigned char little_remote_breakpoint[] = { 0x20, 0xc3 };
442 return big_remote_breakpoint;
444 return little_remote_breakpoint;
450 static unsigned char breakpoint[] = { 0xc3, 0xc3 };
465 #define GET_SOURCE_REG(x) (((x) >> 4) & 0xf) 466 #define GET_TARGET_REG(x) (((x) >> 8) & 0xf) 469 #define IS_JSR(x) (((x) & 0xf0ff) == 0x400b) 473 #define IS_STS(x) ((x) == 0x4f22) 477 #define IS_MACL_STS(x) ((x) == 0x4f12) 481 #define IS_PUSH(x) (((x) & 0xff0f) == 0x2f06) 485 #define IS_MOV_SP_FP(x) ((x) == 0x6ef3) 489 #define IS_ADD_IMM_SP(x) (((x) & 0xff00) == 0x7f00) 491 #define IS_MOV_R3(x) (((x) & 0xff00) == 0x1a00) 492 #define IS_SHLL_R3(x) ((x) == 0x4300) 496 #define IS_ADD_R3SP(x) ((x) == 0x3f3c) 504 #define IS_FPUSH(x) (((x) & 0xff0f) == 0xff0b) 507 #define IS_MOV_ARG_TO_REG(x) \ 508 (((x) & 0xf00f) == 0x6003 && \ 509 ((x) & 0x00f0) >= 0x0040 && \ 510 ((x) & 0x00f0) <= 0x0070) 512 #define IS_MOV_ARG_TO_IND_R14(x) \ 513 (((x) & 0xff0f) == 0x2e02 && \ 514 ((x) & 0x00f0) >= 0x0040 && \ 515 ((x) & 0x00f0) <= 0x0070) 517 #define IS_MOV_ARG_TO_IND_R14_WITH_DISP(x) \ 518 (((x) & 0xff00) == 0x1e00 && \ 519 ((x) & 0x00f0) >= 0x0040 && \ 520 ((x) & 0x00f0) <= 0x0070) 523 #define IS_MOVW_PCREL_TO_REG(x) (((x) & 0xf000) == 0x9000) 525 #define IS_MOVL_PCREL_TO_REG(x) (((x) & 0xf000) == 0xd000) 527 #define IS_MOVI20(x) (((x) & 0xf00f) == 0x0000) 529 #define IS_SUB_REG_FROM_SP(x) (((x) & 0xff0f) == 0x3f08) 531 #define FPSCR_SZ (1 << 20) 534 #define IS_RESTORE_FP(x) ((x) == 0x6ef6) 535 #define IS_RTS(x) ((x) == 0x000b) 536 #define IS_LDS(x) ((x) == 0x4f26) 537 #define IS_MACL_LDS(x) ((x) == 0x4f16) 538 #define IS_MOV_FP_SP(x) ((x) == 0x6fe3) 539 #define IS_ADD_REG_TO_FP(x) (((x) & 0xff0f) == 0x3e0c) 540 #define IS_ADD_IMM_FP(x) (((x) & 0xff00) == 0x7e00) 552 int reg, sav_reg = -1;
555 for (; pc < limit_pc; pc += 2)
576 r3_val = ((inst & 0xff) ^ 0x80) - 0x80;
588 offset = ((inst & 0xff) ^ 0x80) - 0x80;
599 offset = (inst & 0xff) << 1;
613 offset = (inst & 0xff) << 2;
621 && (pc + 2 < limit_pc))
636 if (sav_offset & 0x00080000)
637 sav_offset |= 0xfff00000;
644 if (sav_reg > 0 &&
reg == sav_reg)
665 limit_pc = std::min (limit_pc, pc + (2 * 6));
673 for (; pc < limit_pc; pc += 2)
685 offset = (inst & 0xf) * 4;
705 if (pc + 2 < limit_pc)
729 CORE_ADDR post_prologue_pc, func_addr, func_end_addr, limit_pc;
738 if (post_prologue_pc != 0)
739 return std::max (
pc, post_prologue_pc);
751 limit_pc =
pc + (2 * 28);
755 if (func_end_addr != 0)
756 limit_pc = std::min (limit_pc, func_end_addr);
761 pc = post_prologue_pc;
826 if (len != 1 && len != 2 && len != 4 && len != 8)
922 memset (valbuf, 0,
sizeof (valbuf));
1062 struct value *
function,
1065 struct value **args,
1070 int stack_offset = 0;
1078 int len, reg_size = 0;
1102 for (argnum = 0; argnum < nargs; argnum++)
1134 || argnum > last_reg_arg)
1137 reg_size = (len + 3) & ~3;
1139 stack_offset += reg_size;
1204 struct value *
function,
1207 int nargs,
struct value **args,
1212 int stack_offset = 0;
1219 int len, reg_size = 0;
1239 for (argnum = 0; argnum < nargs; argnum++)
1259 || argnum > last_reg_arg)
1263 reg_size = (len + 3) & ~3;
1265 stack_offset += reg_size;
1327 for (i = 0; i < len; i += 4)
1331 error (
_(
"bad size for return value"));
1343 for (i = 0; i < len; i += 4)
1346 valbuf + len - 4 - i);
1377 for (i = 0; i < len; i += 4)
1391 for (i = 0; i < len; i += 4)
1394 valbuf + len - 4 - i);
1436 static struct type *
1450 static struct type *
1460 static struct type *
1467 static struct type *
1481 static struct type *
1554 static struct type *
1583 (
"sh_register_convert_to_virtual called with non DR register number");
1601 error (
_(
"sh_register_convert_to_raw called with non DR register number"));
1637 for (portion = 0; portion < portions; portion++)
1669 2, base_regnum, temp_buffer);
1695 int base_regnum, portion;
1717 reg_nr,
buffer, temp_buffer);
1720 for (portion = 0; portion < 2; portion++)
1724 base_regnum) * portion));
1731 for (portion = 0; portion < 4; portion++)
1735 base_regnum) * portion));
1747 return SIM_SH_MOD_REGNUM;
1749 return SIM_SH_RS_REGNUM;
1751 return SIM_SH_RE_REGNUM;
1763 return SIM_SH_TBR_REGNUM;
1765 return SIM_SH_IBNR_REGNUM;
1767 return SIM_SH_IBCR_REGNUM;
1769 return SIM_SH_BANK_REGNUM;
1771 return SIM_SH_BANK_MACL_REGNUM;
1773 return SIM_SH_BANK_GBR_REGNUM;
1775 return SIM_SH_BANK_PR_REGNUM;
1777 return SIM_SH_BANK_IVN_REGNUM;
1779 return SIM_SH_BANK_MACH_REGNUM;
1877 *this_cache = cache;
1885 if (cache->
base == 0)
1932 static struct value *
1934 void **this_cache,
int regnum)
1964 if (cache->
base == 0)
2036 if (*this_cache == NULL)
2046 void **this_prologue_cache)
2087 if (addr < func_addr + 4)
2088 addr = func_addr + 4;
2093 while (addr < func_end
2096 if (addr >= func_end)
2135 while (addr > func_addr + 4
2146 && addr > func_addr + 6
2166 int regnum,
const void *regs,
size_t len)
2175 for (i = 0;
regmap[i].regnum != -1; i++)
2178 &&
regmap[i].offset + 4 <= len)
2180 (
char *)regs +
regmap[i].offset);
2192 int regnum,
void *regs,
size_t len)
2201 for (i = 0;
regmap[i].regnum != -1; i++)
2204 &&
regmap[i].offset + 4 <= len)
2206 (
char *)regs +
regmap[i].offset);
2360 case bfd_mach_sh2a_nofpu:
2369 case bfd_mach_sh_dsp:
2375 case bfd_mach_sh3_nommu:
2376 case bfd_mach_sh2a_nofpu_or_sh3_nommu:
2381 case bfd_mach_sh2a_or_sh3e:
2393 case bfd_mach_sh3_dsp:
2400 case bfd_mach_sh2a_or_sh4:
2411 case bfd_mach_sh4_nofpu:
2412 case bfd_mach_sh4a_nofpu:
2413 case bfd_mach_sh4_nommu_nofpu:
2414 case bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu:
2418 case bfd_mach_sh4al_dsp:
2448 (
"\"set sh\" must be followed by an appropriate subcommand.\n");
2464 _(
"Set calling convention used when calling target " 2465 "functions from GDB."),
2466 _(
"Show calling convention used when calling target " 2467 "functions from GDB."),
2468 _(
"gcc - Use GCC calling convention (default).\n" 2469 "renesas - Enforce Renesas calling convention."),
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)
#define GET_TARGET_REG(x)
#define IS_MOVL_PCREL_TO_REG(x)
static const gdb_byte * sh_sw_breakpoint_from_kind(struct gdbarch *gdbarch, int kind, int *size)
#define IS_MOV_ARG_TO_IND_R14(x)
static int sh_register_reggroup_p(struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
struct type * lookup_array_range_type(struct type *element_type, LONGEST low_bound, LONGEST high_bound)
static void pass_on_stack(struct aarch64_call_info *info, struct type *type, struct value *arg)
static const struct frame_base sh_frame_base
struct frame_id frame_id_build(CORE_ADDR stack_addr, CORE_ADDR code_addr)
static int sh_treat_as_flt_p(struct type *type)
CORE_ADDR get_frame_address_in_block(struct frame_info *this_frame)
static CORE_ADDR sh_analyze_prologue(struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR limit_pc, struct sh_frame_cache *cache, ULONGEST fpscr)
static struct type * sh_default_register_type(struct gdbarch *gdbarch, int reg_nr)
void set_gdbarch_float_bit(struct gdbarch *gdbarch, int float_bit)
CORE_ADDR get_frame_pc(struct frame_info *frame)
void set_gdbarch_fp0_regnum(struct gdbarch *gdbarch, int fp0_regnum)
#define IS_MOV_ARG_TO_IND_R14_WITH_DISP(x)
#define IS_MOV_ARG_TO_REG(x)
void gdbarch_init_osabi(struct gdbarch_info info, struct gdbarch *gdbarch)
#define IS_MOVW_PCREL_TO_REG(x)
void set_gdbarch_wchar_bit(struct gdbarch *gdbarch, int wchar_bit)
static void sh_store_return_value_nofpu(struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
static int dr_reg_base_num(struct gdbarch *gdbarch, int dr_regnum)
struct value * frame_unwind_got_memory(struct frame_info *frame, int regnum, CORE_ADDR addr)
void write_memory_unsigned_integer(CORE_ADDR addr, int len, enum bfd_endian byte_order, ULONGEST value)
void sh_corefile_supply_regset(const struct regset *regset, struct regcache *regcache, int regnum, const void *regs, size_t len)
void() iterate_over_regset_sections_cb(const char *sect_name, int size, const struct regset *regset, const char *human_name, void *cb_data)
static CORE_ADDR sh_push_dummy_call_fpu(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)
static enum register_status sh_pseudo_register_read(struct gdbarch *gdbarch, struct regcache *regcache, int reg_nr, gdb_byte *buffer)
struct sh_corefile_regmap * core_fpregmap
struct sh_corefile_regmap * core_gregmap
ULONGEST frame_unwind_register_unsigned(struct frame_info *frame, int regnum)
void set_gdbarch_short_bit(struct gdbarch *gdbarch, int short_bit)
#define IS_ADD_REG_TO_FP(x)
static struct type * sh_sh4_build_float_register_type(struct gdbarch *gdbarch, int high)
static void sh_init_flt_argreg(void)
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
void * memset(T *s, int c, size_t n)=delete
static struct cmd_list_element * setshcmdlist
static struct value * sh_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
void add_setshow_enum_cmd(const char *name, enum command_class theclass, const char *const *enumlist, const char **var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_const_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
static const char * sh_sh_dsp_register_name(struct gdbarch *gdbarch, int reg_nr)
void set_gdbarch_register_reggroup_p(struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype register_reggroup_p)
void target_float_convert(const gdb_byte *from, const struct type *from_type, gdb_byte *to, const struct type *to_type)
static struct type * sh_littlebyte_bigword_type(struct gdbarch *gdbarch)
struct gdbarch_list * gdbarch_list_lookup_by_info(struct gdbarch_list *arches, const struct gdbarch_info *info)
static CORE_ADDR sh_frame_base_address(struct frame_info *this_frame, void **this_cache)
CORE_ADDR skip_prologue_using_sal(struct gdbarch *gdbarch, CORE_ADDR func_addr)
static CORE_ADDR sh_stack_allocsize(int nargs, struct value **args)
CORE_ADDR saved_regs[SH_NUM_REGS]
struct reggroup *const all_reggroup
const struct bfd_arch_info * bfd_arch_info
void set_gdbarch_return_in_first_hidden_param_p(struct gdbarch *gdbarch, gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p)
static void sh_register_convert_to_virtual(struct gdbarch *gdbarch, int regnum, struct type *type, gdb_byte *from, gdb_byte *to)
struct gdbarch_tdep * gdbarch_tdep(struct gdbarch *gdbarch)
#define TYPE_FIELD_TYPE(thistype, n)
static const gdb_byte * sh_justify_value_in_reg(struct gdbarch *gdbarch, struct value *val, int len)
static CORE_ADDR sh_skip_prologue(struct gdbarch *gdbarch, CORE_ADDR pc)
struct type * sh_littlebyte_bigword_type
void frame_unwind_append_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
static const char * sh_sh3_dsp_register_name(struct gdbarch *gdbarch, int reg_nr)
void set_gdbarch_wchar_signed(struct gdbarch *gdbarch, int wchar_signed)
#define FRAME_OBSTACK_ZALLOC(TYPE)
struct value * frame_unwind_got_constant(struct frame_info *frame, int regnum, ULONGEST val)
static CORE_ADDR sh_unwind_sp(struct gdbarch *gdbarch, struct frame_info *next_frame)
struct cmd_list_element * add_prefix_cmd(const char *name, enum command_class theclass, cmd_const_cfunc_ftype *fun, const char *doc, struct cmd_list_element **prefixlist, const char *prefixname, int allow_unknown, struct cmd_list_element **list)
void gdbarch_register(enum bfd_architecture bfd_architecture, gdbarch_init_ftype *init, gdbarch_dump_tdep_ftype *dump_tdep)
static void sh_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
static void sh_iterate_over_regset_sections(struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
#define IS_SUB_REG_FROM_SP(x)
static struct cmd_list_element * showshcmdlist
static const char * sh_sh4al_dsp_register_name(struct gdbarch *gdbarch, int reg_nr)
struct reggroup *const float_reggroup
static CORE_ADDR sh_frame_align(struct gdbarch *ignore, CORE_ADDR sp)
static void sh_pseudo_register_write(struct gdbarch *gdbarch, struct regcache *regcache, int reg_nr, const gdb_byte *buffer)
void frame_base_set_default(struct gdbarch *gdbarch, const struct frame_base *default_base)
struct cmd_list_element * setlist
static int sh_use_struct_convention(int renesas_abi, struct type *type)
void set_gdbarch_pseudo_register_write(struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype pseudo_register_write)
void set_gdbarch_register_type(struct gdbarch *gdbarch, gdbarch_register_type_ftype register_type)
struct type * check_typedef(struct type *type)
LONGEST read_memory_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
const gdb_byte * value_contents(struct value *value)
struct reggroup *const general_reggroup
static const char * sh_sh2a_register_name(struct gdbarch *gdbarch, int reg_nr)
static const char *const sh_cc_enum[]
static struct type * sh_sh3e_register_type(struct gdbarch *gdbarch, int reg_nr)
int gdbarch_sp_regnum(struct gdbarch *gdbarch)
void set_gdbarch_stack_frame_destroyed_p(struct gdbarch *gdbarch, gdbarch_stack_frame_destroyed_p_ftype stack_frame_destroyed_p)
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)
struct reggroup *const system_reggroup
struct type * arch_float_type(struct gdbarch *gdbarch, int bit, const char *name, const struct floatformat **floatformats)
void set_gdbarch_sp_regnum(struct gdbarch *gdbarch, int sp_regnum)
static const char * sh_sh3_register_name(struct gdbarch *gdbarch, int reg_nr)
static int fv_reg_base_num(struct gdbarch *gdbarch, int fv_regnum)
struct type * register_type(struct gdbarch *gdbarch, int regnum)
void set_gdbarch_dummy_id(struct gdbarch *gdbarch, gdbarch_dummy_id_ftype dummy_id)
static int sh_dsp_register_sim_regno(struct gdbarch *gdbarch, int nr)
static void set_sh_command(const char *args, int from_tty)
struct cmd_list_element * showlist
int legacy_register_sim_regno(struct gdbarch *gdbarch, int regnum)
void set_gdbarch_believe_pcc_promotion(struct gdbarch *gdbarch, int believe_pcc_promotion)
const struct floatformat * floatformats_ieee_double_littlebyte_bigword[BFD_ENDIAN_UNKNOWN]
static struct type * sh_sh4_register_type(struct gdbarch *gdbarch, int reg_nr)
#define gdb_assert_not_reached(message)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
static int sh_is_renesas_calling_convention(struct type *func_type)
void set_gdbarch_register_sim_regno(struct gdbarch *gdbarch, gdbarch_register_sim_regno_ftype register_sim_regno)
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)
static CORE_ADDR sh_unwind_pc(struct gdbarch *gdbarch, struct frame_info *next_frame)
int default_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
static enum register_status pseudo_register_read_portions(struct gdbarch *gdbarch, struct regcache *regcache, int portions, int base_regnum, gdb_byte *buffer)
static struct sh_frame_cache * sh_make_stub_cache(struct frame_info *this_frame)
const char * gdbarch_register_name(struct gdbarch *gdbarch, int regnr)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int status
static const char * sh_sh2a_nofpu_register_name(struct gdbarch *gdbarch, int reg_nr)
void set_gdbarch_unwind_sp(struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype unwind_sp)
void printf_unfiltered(const char *format,...)
static const char sh_cc_gcc[]
struct reggroup *const vector_reggroup
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_long_long_bit(struct gdbarch *gdbarch, int long_long_bit)
static int sh_sh2a_register_sim_regno(struct gdbarch *gdbarch, int nr)
const struct floatformat * floatformats_ieee_single[BFD_ENDIAN_UNKNOWN]
void sh_corefile_collect_regset(const struct regset *regset, const struct regcache *regcache, int regnum, void *regs, size_t len)
void regcache_invalidate(struct regcache *regcache, int regnum)
const struct regset sh_corefile_gregset
static const char * sh_sh2e_register_name(struct gdbarch *gdbarch, int reg_nr)
static int sh_use_struct_convention_nofpu(int renesas_abi, struct type *type)
int core_addr_lessthan(CORE_ADDR lhs, CORE_ADDR rhs)
void help_list(struct cmd_list_element *list, const char *cmdtype, enum command_class theclass, struct ui_file *stream)
static enum return_value_convention sh_return_value_fpu(struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
static void sh_register_convert_to_raw(struct gdbarch *gdbarch, struct type *type, int regnum, const gdb_byte *from, gdb_byte *to)
void set_gdbarch_pseudo_register_read(struct gdbarch *gdbarch, gdbarch_pseudo_register_read_ftype pseudo_register_read)
static void sh_stub_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
#define TYPE_TARGET_TYPE(thistype)
struct type * builtin_double
int gdbarch_register_reggroup_p(struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
static void sh_dwarf2_frame_init_reg(struct gdbarch *gdbarch, int regnum, struct dwarf2_frame_state_reg *reg, struct frame_info *this_frame)
static struct type * sh_sh2a_register_type(struct gdbarch *gdbarch, int reg_nr)
static const struct regset sh_corefile_fpregset
static void sh_store_return_value_fpu(struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
static int sh_breakpoint_kind_from_pc(struct gdbarch *gdbarch, CORE_ADDR *pcptr)
int gdbarch_fp0_regnum(struct gdbarch *gdbarch)
static struct gdbarch * sh_gdbarch_init(struct gdbarch_info info, struct gdbarch_list *arches)
static int sh_next_flt_argreg(struct gdbarch *gdbarch, int len, struct type *func_type)
#define TYPE_CODE(thistype)
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)
static int in_plt_section(CORE_ADDR pc)
#define TYPE_CALLING_CONVENTION(thistype)
static const char * sh_sh_register_name(struct gdbarch *gdbarch, int reg_nr)
void set_gdbarch_int_bit(struct gdbarch *gdbarch, int int_bit)
void _initialize_sh_tdep(void)
static void sh_extract_return_value_fpu(struct type *type, struct regcache *regcache, gdb_byte *valbuf)
#define TYPE_NFIELDS(thistype)
void set_gdbarch_num_pseudo_regs(struct gdbarch *gdbarch, int num_pseudo_regs)
static void sh_extract_return_value_nofpu(struct type *type, struct regcache *regcache, gdb_byte *valbuf)
static const char * sh_sh4_nofpu_register_name(struct gdbarch *gdbarch, int reg_nr)
void dwarf2_append_unwinders(struct gdbarch *gdbarch)
#define GET_SOURCE_REG(x)
static int flt_argreg_array[FLOAT_ARGLAST_REGNUM - FLOAT_ARG0_REGNUM+1]
void set_gdbarch_double_format(struct gdbarch *gdbarch, const struct floatformat **double_format)
void regcache_raw_supply(struct regcache *regcache, int regnum, const void *buf)
static const char * sh_active_calling_convention
unsigned long long ULONGEST
enum unwind_stop_reason default_frame_unwind_stop_reason(struct frame_info *this_frame, void **this_cache)
static const struct frame_unwind sh_frame_unwind
static int ignore(struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
int register_size(struct gdbarch *gdbarch, int regnum)
static struct sh_frame_cache * sh_alloc_frame_cache(void)
static struct frame_id sh_dummy_id(struct gdbarch *gdbarch, struct frame_info *this_frame)
void set_gdbarch_long_double_bit(struct gdbarch *gdbarch, int long_double_bit)
static const char sh_cc_renesas[]
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)
const struct bfd_arch_info * gdbarch_bfd_arch_info(struct gdbarch *gdbarch)
void dwarf2_frame_set_init_reg(struct gdbarch *gdbarch, void(*init_reg)(struct gdbarch *, int, struct dwarf2_frame_state_reg *, struct frame_info *))
void regcache_raw_collect(const struct regcache *regcache, int regnum, void *buf)
int gdbarch_pc_regnum(struct gdbarch *gdbarch)
static struct sh_frame_cache * sh_frame_cache(struct frame_info *this_frame, void **this_cache)
int default_register_reggroup_p(struct gdbarch *gdbarch, int regnum, struct reggroup *group)
static const char * sh_sh3e_register_name(struct gdbarch *gdbarch, int reg_nr)
#define TYPE_LENGTH(thistype)
void set_gdbarch_ptr_bit(struct gdbarch *gdbarch, int ptr_bit)
static int sh_stub_unwind_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
void set_gdbarch_push_dummy_call(struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype push_dummy_call)
gdbarch_init_ftype sh64_gdbarch_init
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 set_gdbarch_iterate_over_regset_sections(struct gdbarch *gdbarch, gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections)
static int sh_return_in_first_hidden_param_p(struct gdbarch *gdbarch, struct type *type)
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 sh_push_dummy_call_nofpu(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)
static const char * sh_sh4_register_name(struct gdbarch *gdbarch, int reg_nr)
static int sh_stack_frame_destroyed_p(struct gdbarch *gdbarch, CORE_ADDR pc)
enum bfd_endian byte_order
void set_gdbarch_pc_regnum(struct gdbarch *gdbarch, int pc_regnum)
static const struct frame_unwind sh_stub_unwind
void set_gdbarch_register_name(struct gdbarch *gdbarch, gdbarch_register_name_ftype register_name)
static enum return_value_convention sh_return_value_nofpu(struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
CORE_ADDR get_frame_func(struct frame_info *this_frame)
void error(const char *fmt,...)
static void show_sh_command(const char *args, int from_tty)
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)
struct type * builtin_float
static void store_unsigned_integer(gdb_byte *addr, int len, enum bfd_endian byte_order, ULONGEST val)
struct type * builtin_int
void regcache_raw_write(struct regcache *regcache, int regnum, const gdb_byte *buf)