99 TYPE_NAME (t) =
"spu_builtin_type_vec128";
116 static const char *register_names[] =
118 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
119 "r8",
"r9",
"r10",
"r11",
"r12",
"r13",
"r14",
"r15",
120 "r16",
"r17",
"r18",
"r19",
"r20",
"r21",
"r22",
"r23",
121 "r24",
"r25",
"r26",
"r27",
"r28",
"r29",
"r30",
"r31",
122 "r32",
"r33",
"r34",
"r35",
"r36",
"r37",
"r38",
"r39",
123 "r40",
"r41",
"r42",
"r43",
"r44",
"r45",
"r46",
"r47",
124 "r48",
"r49",
"r50",
"r51",
"r52",
"r53",
"r54",
"r55",
125 "r56",
"r57",
"r58",
"r59",
"r60",
"r61",
"r62",
"r63",
126 "r64",
"r65",
"r66",
"r67",
"r68",
"r69",
"r70",
"r71",
127 "r72",
"r73",
"r74",
"r75",
"r76",
"r77",
"r78",
"r79",
128 "r80",
"r81",
"r82",
"r83",
"r84",
"r85",
"r86",
"r87",
129 "r88",
"r89",
"r90",
"r91",
"r92",
"r93",
"r94",
"r95",
130 "r96",
"r97",
"r98",
"r99",
"r100",
"r101",
"r102",
"r103",
131 "r104",
"r105",
"r106",
"r107",
"r108",
"r109",
"r110",
"r111",
132 "r112",
"r113",
"r114",
"r115",
"r116",
"r117",
"r118",
"r119",
133 "r120",
"r121",
"r122",
"r123",
"r124",
"r125",
"r126",
"r127",
134 "id",
"pc",
"sp",
"fpscr",
"srr0",
"lslr",
"decr",
"decr_status" 139 if (reg_nr >=
sizeof register_names /
sizeof *register_names)
142 return register_names[reg_nr];
199 xsnprintf (annex,
sizeof annex,
"%d/%s", (
int)
id, regname);
224 memcpy (buf,
reg, 4);
231 xsnprintf (annex,
sizeof annex,
"%d/fpcr", (
int)
id);
263 xsnprintf (annex,
sizeof annex,
"%d/%s", (
int)
id, regname);
282 memcpy (
reg, buf, 4);
288 xsnprintf (annex,
sizeof annex,
"%d/fpcr", (
int)
id);
360 static struct value *
370 int preferred_slot = len < 4 ? 4 - len : 0;
432 if (dwarf2_addr_class == 1)
449 const char *
name,
int *type_flags_ptr)
451 if (strcmp (
name,
"__ea") == 0)
482 return addr?
SPUADDR (
id, addr) : 0;
533 is_rr (
unsigned int insn,
int op,
int *rt,
int *ra,
int *rb)
535 if ((insn >> 21) == op)
538 *ra = (insn >> 7) & 127;
539 *rb = (insn >> 14) & 127;
547 is_rrr (
unsigned int insn,
int op,
int *rt,
int *ra,
int *rb,
int *rc)
549 if ((insn >> 28) == op)
551 *rt = (insn >> 21) & 127;
552 *ra = (insn >> 7) & 127;
553 *rb = (insn >> 14) & 127;
562 is_ri7 (
unsigned int insn,
int op,
int *rt,
int *ra,
int *i7)
564 if ((insn >> 21) == op)
567 *ra = (insn >> 7) & 127;
568 *i7 = (((insn >> 14) & 127) ^ 0x40) - 0x40;
576 is_ri10 (
unsigned int insn,
int op,
int *rt,
int *ra,
int *i10)
578 if ((insn >> 24) == op)
581 *ra = (insn >> 7) & 127;
582 *i10 = (((insn >> 14) & 0x3ff) ^ 0x200) - 0x200;
590 is_ri16 (
unsigned int insn,
int op,
int *rt,
int *i16)
592 if ((insn >> 23) == op)
595 *i16 = (((insn >> 7) & 0xffff) ^ 0x8000) - 0x8000;
603 is_ri18 (
unsigned int insn,
int op,
int *rt,
int *i18)
605 if ((insn >> 25) == op)
608 *i18 = (((insn >> 7) & 0x3ffff) ^ 0x20000) - 0x20000;
730 for (pc = start_pc; pc < end_pc; pc += 4)
733 int rt, ra, rb, rc, immed;
768 else if (
is_rr (insn,
op_a, &rt, &ra, &rb))
772 if (reg_immed[rb] != 0)
784 if (reg_immed[rb] != 0)
785 data->
size = -reg_immed[rb];
793 reg_immed[rt] = immed;
801 reg_immed[rt] = immed & 0x3ffff;
904 CORE_ADDR scan_pc, func_start, func_end, epilogue_start, epilogue_end;
907 int rt, ra, rb, immed;
912 const int spu_max_epilogue_size = 64 * 4;
917 if (pc - func_start < spu_max_epilogue_size)
918 epilogue_start = func_start;
920 epilogue_start = pc - spu_max_epilogue_size;
922 if (func_end - pc < spu_max_epilogue_size)
923 epilogue_end = func_end;
925 epilogue_end = pc + spu_max_epilogue_size;
929 for (scan_pc = pc; scan_pc < epilogue_end; scan_pc += 4)
952 if (scan_pc >= epilogue_end)
957 for (scan_pc = pc - 4; scan_pc >= epilogue_start; scan_pc -= 4)
992 void **this_prologue_cache)
1002 if (*this_prologue_cache)
1006 *this_prologue_cache = info;
1013 if (info->
func == 0)
1066 if (
status && backchain > 0 && backchain <= lslr)
1069 if (backchain + 16 <= lslr)
1112 void **this_prologue_cache,
struct frame_id *this_id)
1123 static struct value *
1125 void **this_prologue_cache,
int regnum)
1217 void **this_cache,
struct frame_id *this_id)
1223 static struct value *
1225 void **this_cache,
int regnum)
1238 struct frame_info *this_frame,
void **this_prologue_cache)
1270 *this_prologue_cache = cache;
1278 *this_prologue_cache = cache;
1320 sp = (sp - 4) & ~15;
1357 int preferred_slot = len < 4 ? 4 - len : 0;
1382 int preferred_slot = len < 4 ? 4 - len : 0;
1413 memset (buf, 0,
sizeof buf);
1422 memset (buf, 0,
sizeof buf);
1428 for (i = 0; i < nargs; i++)
1430 struct value *arg = args[i];
1448 if (stack_arg != -1)
1453 for (i = stack_arg; i < nargs; i++)
1461 for (i = stack_arg; i < nargs; i++)
1463 struct value *arg = args[i];
1469 preferred_slot = len < 4 ? 4 - len : 0;
1487 for (i = 0; i < 4; i++)
1515 int opencl_vector = 0;
1548 error (
_(
"Cannot set function return value."));
1564 error (
_(
"Function return value unknown."));
1614 static std::vector<CORE_ADDR>
1624 std::vector<CORE_ADDR> next_pcs;
1642 if ((insn & 0xffffff00) == 0x00002100)
1661 target = target & lslr;
1662 if (target != next_pc)
1712 (
struct ui_file *) info->stream);
1723 memcpy (&spu_info, info,
sizeof (*info));
1782 enum bfd_endian byte_order = bfd_big_endian (
objfile->
obfd)?
1783 BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE;
1785 CORE_ADDR ovly_table_base, ovly_buf_table_base;
1786 unsigned ovly_table_size, ovly_buf_table_size;
1797 if (!ovly_table_msym.
minsym)
1802 if (!ovly_buf_table_msym.
minsym)
1812 read_memory (ovly_table_base, ovly_table, ovly_table_size);
1818 for (i = 0; i < ovly_table_size / 16; i++)
1829 if (buf == 0 || (buf - 1) * 4 >= ovly_buf_table_size)
1837 tbl[ndx].
mapped_ptr = ovly_buf_table_base + (buf - 1) * 4;
1853 enum bfd_endian byte_order = bfd_big_endian (osect->
objfile->
obfd)?
1854 BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE;
1921 if (ovly_table[ndx].mapped_ptr == 0)
1922 bfd_section_lma (obfd, bsect) = bfd_section_vma (obfd, bsect);
2032 if (msymbol.
minsym != NULL)
2076 error (
_(
"\"info spu\" is only supported on the SPU architecture."));
2080 xsnprintf (annex,
sizeof annex,
"%d/event_status",
id);
2082 buf, 0, (
sizeof (buf) - 1));
2084 error (
_(
"Could not read event_status."));
2086 event_status =
strtoulst ((
char *) buf, NULL, 16);
2088 xsnprintf (annex,
sizeof annex,
"%d/event_mask",
id);
2090 buf, 0, (
sizeof (buf) - 1));
2092 error (
_(
"Could not read event_mask."));
2094 event_mask =
strtoulst ((
char *) buf, NULL, 16);
2101 "0x%s",
phex_nz (event_status, 4));
2103 "0x%s",
phex_nz (event_mask, 4));
2120 int signal1_pending = 0;
2123 int signal2_pending = 0;
2130 error (
_(
"\"info spu\" is only supported on the SPU architecture."));
2134 xsnprintf (annex,
sizeof annex,
"%d/signal1",
id);
2137 error (
_(
"Could not read signal1."));
2141 signal1_pending = 1;
2144 xsnprintf (annex,
sizeof annex,
"%d/signal1_type",
id);
2146 buf, 0, (
sizeof (buf) - 1));
2148 error (
_(
"Could not read signal1_type."));
2150 signal1_type =
strtoulst ((
char *) buf, NULL, 16);
2152 xsnprintf (annex,
sizeof annex,
"%d/signal2",
id);
2155 error (
_(
"Could not read signal2."));
2159 signal2_pending = 1;
2162 xsnprintf (annex,
sizeof annex,
"%d/signal2_type",
id);
2164 buf, 0, (
sizeof (buf) - 1));
2166 error (
_(
"Could not read signal2_type."));
2168 signal2_type =
strtoulst ((
char *) buf, NULL, 16);
2174 current_uiout->field_int (
"signal1_pending", signal1_pending);
2177 current_uiout->field_int (
"signal2_pending", signal2_pending);
2183 if (signal1_pending)
2193 if (signal2_pending)
2207 const char *
field,
const char *msg)
2219 for (i = 0; i < nr; i++)
2245 error (
_(
"\"info spu\" is only supported on the SPU architecture."));
2251 xsnprintf (annex,
sizeof annex,
"%d/mbox_info",
id);
2253 buf, 0,
sizeof buf);
2255 error (
_(
"Could not read mbox_info."));
2258 "mbox",
"SPU Outbound Mailbox");
2260 xsnprintf (annex,
sizeof annex,
"%d/ibox_info",
id);
2262 buf, 0,
sizeof buf);
2264 error (
_(
"Could not read ibox_info."));
2267 "ibox",
"SPU Outbound Interrupt Mailbox");
2269 xsnprintf (annex,
sizeof annex,
"%d/wbox_info",
id);
2271 buf, 0,
sizeof buf);
2273 error (
_(
"Could not read wbox_info."));
2276 "wbox",
"SPU Inbound Mailbox");
2283 return (word >> (63 - last)) & mask;
2289 static const char *spu_mfc_opcode[256] =
2291 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2292 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2293 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2294 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2295 "put",
"putb",
"putf", NULL,
"putl",
"putlb",
"putlf", NULL,
2296 "puts",
"putbs",
"putfs", NULL, NULL, NULL, NULL, NULL,
2297 "putr",
"putrb",
"putrf", NULL,
"putrl",
"putrlb",
"putrlf", NULL,
2298 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2299 "get",
"getb",
"getf", NULL,
"getl",
"getlb",
"getlf", NULL,
2300 "gets",
"getbs",
"getfs", NULL, NULL, NULL, NULL, NULL,
2301 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2302 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2303 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2304 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2305 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2306 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2307 "sdcrt",
"sdcrtst", NULL, NULL, NULL, NULL, NULL, NULL,
2308 NULL,
"sdcrz", NULL, NULL, NULL,
"sdcrst", NULL,
"sdcrf",
2309 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2310 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2311 "sndsig",
"sndsigb",
"sndsigf", NULL, NULL, NULL, NULL, NULL,
2312 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2313 "putlluc", NULL, NULL, NULL,
"putllc", NULL, NULL, NULL,
2314 "putqlluc", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2315 "barrier", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2316 "mfceieio", NULL, NULL, NULL,
"mfcsync", NULL, NULL, NULL,
2317 "getllar", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2318 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2319 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2320 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2321 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2322 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2325 int *seq = XALLOCAVEC (
int, nr);
2331 for (i = 0; i < nr; i++)
2335 for (j = 0; j < nr; j++)
2340 if (done & (1 << (nr - 1 - j)))
2349 if ((dependencies & done) != dependencies)
2353 done |= 1 << (nr - 1 - j);
2379 for (i = 0; i < nr; i++)
2384 int mfc_cmd_opcode, mfc_cmd_tag, rclass_id, tclass_id;
2385 int list_lsa, list_size, mfc_lsa, mfc_size;
2387 int list_valid_p, qw_valid_p, ea_valid_p, cmd_error_p;
2419 if (spu_mfc_opcode[mfc_cmd_opcode])
2420 current_uiout->field_string (
"opcode", spu_mfc_opcode[mfc_cmd_opcode]);
2441 current_uiout->field_fmt (
"lstaddr",
"0x%05x", list_lsa << 3);
2442 current_uiout->field_fmt (
"lstsize",
"0x%05x", list_size << 3);
2470 ULONGEST dma_info_stall_and_notify;
2471 ULONGEST dma_info_atomic_command_status;
2478 error (
_(
"\"info spu\" is only supported on the SPU architecture."));
2482 xsnprintf (annex,
sizeof annex,
"%d/dma_info",
id);
2484 buf, 0, 40 + 16 * 32);
2486 error (
_(
"Could not read dma_info."));
2494 dma_info_stall_and_notify
2496 dma_info_atomic_command_status
2508 phex_nz (dma_info_status, 4));
2509 current_uiout->field_fmt (
"dma_info_stall_and_notify",
"0x%s",
2510 phex_nz (dma_info_stall_and_notify, 4));
2511 current_uiout->field_fmt (
"dma_info_atomic_command_status",
"0x%s",
2512 phex_nz (dma_info_atomic_command_status, 4));
2516 const char *query_msg =
_(
"no query pending");
2518 if (dma_info_type & 4)
2519 switch (dma_info_type & 3)
2521 case 1: query_msg =
_(
"'any' query pending");
break;
2522 case 2: query_msg =
_(
"'all' query pending");
break;
2523 default: query_msg =
_(
"undefined query type");
break;
2527 phex (dma_info_status, 4));
2529 phex (dma_info_mask, 4), query_msg);
2531 phex (dma_info_stall_and_notify, 4));
2533 phex (dma_info_atomic_command_status, 4));
2555 error (
_(
"\"info spu\" is only supported on the SPU architecture."));
2559 xsnprintf (annex,
sizeof annex,
"%d/proxydma_info",
id);
2561 buf, 0, 24 + 8 * 32);
2563 error (
_(
"Could not read proxydma_info."));
2578 phex_nz (dma_info_status, 4));
2582 const char *query_msg;
2584 switch (dma_info_type & 3)
2586 case 0: query_msg =
_(
"no query pending");
break;
2587 case 1: query_msg =
_(
"'any' query pending");
break;
2588 case 2: query_msg =
_(
"'all' query pending");
break;
2589 default: query_msg =
_(
"undefined query type");
break;
2593 phex (dma_info_status, 4));
2595 phex (dma_info_mask, 4), query_msg);
2606 "the name of an SPU facility.\n"));
2658 const char *
name = strrchr (info.
abfd->filename,
'@');
2660 sscanf (
name,
"@0x%*x <%d>", &
id);
2669 if (tdep && tdep->
id ==
id)
2784 _(
"Various SPU specific commands."),
2787 _(
"Various SPU specific commands."),
2794 Set whether to stop for new SPE threads."),
2796 Show whether to stop for new SPE threads."),
2798 Use \"on\" to give control to the user when a new SPE thread\n\ 2799 enters its \"main\" function.\n\ 2800 Use \"off\" to disable stopping for new SPE threads."),
2809 Set whether to automatically flush the software-managed cache."),
2811 Show whether to automatically flush the software-managed cache."),
2813 Use \"on\" to automatically flush the software-managed cache\n\ 2814 whenever SPE execution stops.\n\ 2815 Use \"off\" to never automatically flush the software-managed cache."),
2822 _(
"Various SPU specific commands."),
2827 _(
"Display SPU event facility status.\n"),
2830 _(
"Display SPU signal notification facility status.\n"),
2833 _(
"Display SPU mailbox facility status.\n"),
2836 _(
"Display MFC DMA status.\n"),
2839 _(
"Display MFC Proxy-DMA status.\n"),
struct gdbarch * target_gdbarch(void)
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)
void set_gdbarch_float_format(struct gdbarch *gdbarch, const struct floatformat **float_format)
void set_gdbarch_address_class_type_flags_to_name(struct gdbarch *gdbarch, gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
static void info_spu_proxydma_command(const char *args, int from_tty)
struct frame_id frame_id_build(CORE_ADDR stack_addr, CORE_ADDR code_addr)
#define SPUADDR(spu, addr)
void set_gdbarch_get_longjmp_target(struct gdbarch *gdbarch, gdbarch_get_longjmp_target_ftype get_longjmp_target)
struct value * frame_unwind_got_bytes(struct frame_info *frame, int regnum, gdb_byte *buf)
constexpr gdb_byte spu_break_insn[]
#define OBSTACK_CALLOC(OBSTACK, NUMBER, TYPE)
static void spu_dis_asm_print_address(bfd_vma addr, struct disassemble_info *info)
struct frame_info * get_selected_frame(const char *message)
struct type * builtin_func_ptr
void set_gdbarch_float_bit(struct gdbarch *gdbarch, int float_bit)
CORE_ADDR get_frame_pc(struct frame_info *frame)
static int is_ri7(unsigned int insn, int op, int *rt, int *ra, int *i7)
static void show_spu_command(const char *args, int from_tty)
static void spu_overlay_update_osect(struct obj_section *osect)
struct frame_info * get_current_frame(void)
struct type * builtin_void
static struct type * spu_register_type(struct gdbarch *gdbarch, int reg_nr)
static struct cmd_list_element * showspucmdlist
void _initialize_spu_tdep(void)
static int spu_auto_flush_cache_p
int target_write_memory(CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
void print_address(struct gdbarch *, CORE_ADDR, struct ui_file *)
int ptid_get_pid(const ptid_t &ptid)
int reg_offset[SPU_NUM_GPRS]
void ax_reg_mask(struct agent_expr *ax, int reg)
struct value * trad_frame_get_prev_register(struct frame_info *this_frame, struct trad_frame_saved_reg this_saved_regs[], int regnum)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int int rusage_t pid_t pid
const struct floatformat * floatformats_ieee_double[BFD_ENDIAN_UNKNOWN]
static void spu_virtual_frame_pointer(struct gdbarch *gdbarch, CORE_ADDR pc, int *reg, LONGEST *offset)
int trad_frame_addr_p(struct trad_frame_saved_reg this_saved_regs[], int regnum)
static void show_spu_stop_on_load(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
int section_is_overlay(struct obj_section *section)
static CORE_ADDR spu_read_pc(struct regcache *regcache)
struct bfd_section * the_bfd_section
#define BMSYMBOL_VALUE_ADDRESS(symbol)
regcache(gdbarch *gdbarch)
void trad_frame_set_value(struct trad_frame_saved_reg this_saved_regs[], int regnum, LONGEST val)
#define SPUADDR_SPU(addr)
static struct value * spu_value_from_register(struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_id frame_id)
#define TYPE_NAME(thistype)
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)
LONGEST target_write(struct target_ops *ops, enum target_object object, const char *annex, const gdb_byte *buf, ULONGEST offset, LONGEST len)
static void show_spu_auto_flush_cache(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static int spu_stack_frame_destroyed_p(struct gdbarch *gdbarch, CORE_ADDR pc)
static CORE_ADDR spu_frame_base_address(struct frame_info *this_frame, void **this_cache)
static const struct frame_unwind spu2ppu_unwind
void set_gdbarch_integer_to_address(struct gdbarch *gdbarch, gdbarch_integer_to_address_ftype integer_to_address)
static void spu_value_to_regcache(struct regcache *regcache, int regnum, struct type *type, const gdb_byte *in)
ULONGEST frame_unwind_register_unsigned(struct frame_info *frame, int regnum)
static void spu2ppu_dealloc_cache(struct frame_info *self, void *this_cache)
void set_gdbarch_short_bit(struct gdbarch *gdbarch, int short_bit)
static void spu_pseudo_register_write(struct gdbarch *gdbarch, struct regcache *regcache, int regnum, const gdb_byte *buf)
static const char * spu_register_name(struct gdbarch *gdbarch, int reg_nr)
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
static void spu_catch_start(struct objfile *objfile)
static int is_ri16(unsigned int insn, int op, int *rt, int *i16)
char * phex(ULONGEST l, int sizeof_l)
const struct objfile_type * objfile_type(struct objfile *objfile)
static CORE_ADDR spu_pointer_to_address(struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
CORE_ADDR get_frame_sp(struct frame_info *this_frame)
void set_gdbarch_frame_red_zone_size(struct gdbarch *gdbarch, int frame_red_zone_size)
void * memset(T *s, int c, size_t n)=delete
void internal_error(const char *file, int line, const char *fmt,...)
void set_gdbarch_ax_pseudo_register_collect(struct gdbarch *gdbarch, gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect)
static ULONGEST spu_mfc_get_bitfield(ULONGEST word, int first, int last)
void set_gdbarch_register_reggroup_p(struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype register_reggroup_p)
int safe_read_memory_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order, LONGEST *return_value)
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **list)
#define ALL_OBJSECTIONS(objfile, osect)
static void spu_frame_this_id(struct frame_info *this_frame, void **this_prologue_cache, struct frame_id *this_id)
void regcache_cooked_write_part(struct regcache *regcache, int regnum, int offset, int len, const gdb_byte *buf)
static int is_ri18(unsigned int insn, int op, int *rt, int *i18)
#define ALL_OBJFILE_OSECTIONS(objfile, osect)
struct gdbarch_list * gdbarch_list_lookup_by_info(struct gdbarch_list *arches, const struct gdbarch_info *info)
#define BLOCKVECTOR_BLOCK(blocklist, n)
struct gdbarch_list * next
struct reggroup *const restore_reggroup
static CORE_ADDR spu_integer_to_address(struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
void ax_reg(struct agent_expr *x, int reg)
static struct gdbarch * spu_gdbarch_init(struct gdbarch_info info, struct gdbarch_list *arches)
struct type * spu_builtin_type_vec128
struct symtab_and_line find_function_start_sal(struct symbol *sym, int funfirstline)
void set_gdbarch_dwarf2_reg_to_regnum(struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
struct gdbarch_tdep * gdbarch_tdep(struct gdbarch *gdbarch)
static enum register_status spu_pseudo_register_read_spu(struct regcache *regcache, const char *regname, gdb_byte *buf)
void frame_unwind_prepend_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
void frame_unwind_append_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
void set_gdbarch_significant_addr_bit(struct gdbarch *gdbarch, int significant_addr_bit)
struct type * builtin_int32
#define FRAME_OBSTACK_ZALLOC(TYPE)
static void spu_overlay_new_objfile(struct objfile *objfile)
void printf_filtered(const char *format,...)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
struct regcache * regcache_dup(struct regcache *src)
static int spu_ax_pseudo_register_push_stack(struct gdbarch *gdbarch, struct agent_expr *ax, int regnum)
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)
#define MSYMBOL_OBJ_SECTION(objfile, symbol)
void set_gdbarch_addr_bit(struct gdbarch *gdbarch, int addr_bit)
struct reggroup *const float_reggroup
struct cmd_list_element * infolist
void frame_base_set_default(struct gdbarch *gdbarch, const struct frame_base *default_base)
struct cmd_list_element * setlist
struct type * builtin_int128
static void info_spu_signal_command(const char *args, int from_tty)
void set_gdbarch_pseudo_register_write(struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype pseudo_register_write)
static const char * spu_address_class_type_flags_to_name(struct gdbarch *gdbarch, int type_flags)
static void spu_address_to_pointer(struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
void append_composite_type_field(struct type *t, const char *name, struct type *field)
void set_gdbarch_register_type(struct gdbarch *gdbarch, gdbarch_register_type_ftype register_type)
struct type * check_typedef(struct type *type)
const gdb_byte * value_contents(struct value *value)
struct reggroup *const general_reggroup
enum register_status regcache_raw_read_part(struct regcache *regcache, int regnum, int offset, int len, gdb_byte *buf)
static struct spu_overlay_table * spu_get_overlay_table(struct objfile *objfile)
static CORE_ADDR spu_analyze_prologue(struct gdbarch *gdbarch, CORE_ADDR start_pc, CORE_ADDR end_pc, struct spu_prologue_data *data)
static struct objfile * spu_objfile_from_frame(struct frame_info *frame)
struct target_ops current_target
static void info_spu_event_command(const char *args, int from_tty)
objfile(bfd *, const char *, objfile_flags)
static int spu_address_class_name_to_type_flags(struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
struct value::@186::@187 reg
void fprintf_filtered(struct ui_file *stream, const char *format,...)
static std::vector< CORE_ADDR > spu_software_single_step(struct regcache *regcache)
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)
void set_gdbarch_sp_regnum(struct gdbarch *gdbarch, int sp_regnum)
void set_gdbarch_decr_pc_after_break(struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break)
static int is_ri10(unsigned int insn, int op, int *rt, int *ra, int *i10)
void set_gdbarch_dummy_id(struct gdbarch *gdbarch, gdbarch_dummy_id_ftype dummy_id)
struct cmd_list_element * showlist
void set_gdbarch_address_to_pointer(struct gdbarch *gdbarch, gdbarch_address_to_pointer_ftype address_to_pointer)
struct type * builtin_int16
int default_print_insn(bfd_vma memaddr, disassemble_info *info)
#define MSYMBOL_SIZE(msymbol)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
struct gdbarch * get_objfile_arch(const struct objfile *objfile)
static struct cmd_list_element * setspucmdlist
struct obj_section * sections
int find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr)
struct type * init_vector_type(struct type *elt_type, int n)
static const struct frame_unwind spu_frame_unwind
static void set_spu_command(const char *args, int from_tty)
void set_gdbarch_value_from_register(struct gdbarch *gdbarch, gdbarch_value_from_register_ftype value_from_register)
void set_gdbarch_unwind_pc(struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype unwind_pc)
struct type * builtin_uint32
int default_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
static CORE_ADDR spu_frame_align(struct gdbarch *gdbarch, CORE_ADDR sp)
static CORE_ADDR spu_push_dummy_code(struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int status
static struct value * spu2ppu_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
struct compunit_symtab * find_pc_sect_compunit_symtab(CORE_ADDR pc, struct obj_section *section)
void set_gdbarch_read_pc(struct gdbarch *gdbarch, gdbarch_read_pc_ftype read_pc)
std::unique_ptr< event_location, event_location_deleter > event_location_up
void set_gdbarch_pointer_to_address(struct gdbarch *gdbarch, gdbarch_pointer_to_address_ftype pointer_to_address)
void set_gdbarch_unwind_sp(struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype unwind_sp)
struct regcache * regcache
ULONGEST strtoulst(const char *num, const char **trailer, int base)
void set_value_offset(struct value *value, LONGEST offset)
void set_gdbarch_ax_pseudo_register_push_stack(struct gdbarch *gdbarch, gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack)
void printf_unfiltered(const char *format,...)
void read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
#define TYPE_ADDRESS_CLASS_1(t)
static void info_spu_dma_command(const char *args, int from_tty)
ULONGEST get_frame_register_unsigned(struct frame_info *frame, int regnum)
struct breakpoint_ops bkpt_breakpoint_ops
event_location_up new_address_location(CORE_ADDR addr, const char *addr_string, int addr_string_len)
struct type * builtin_uint128
void set_gdbarch_breakpoint_kind_from_pc(struct gdbarch *gdbarch, gdbarch_breakpoint_kind_from_pc_ftype breakpoint_kind_from_pc)
struct trad_frame_saved_reg * trad_frame_alloc_saved_regs(struct gdbarch *gdbarch)
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)
LONGEST unpack_long(struct type *type, const gdb_byte *valaddr)
static int spu_get_longjmp_target(struct frame_info *frame, CORE_ADDR *pc)
static int gdb_print_insn_spu(bfd_vma memaddr, struct disassemble_info *info)
static int spu_register_reggroup_p(struct gdbarch *gdbarch, int regnum, struct reggroup *group)
static struct frame_id spu_dummy_id(struct gdbarch *gdbarch, struct frame_info *this_frame)
static enum return_value_convention spu_return_value(struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, gdb_byte *out, const gdb_byte *in)
void set_gdbarch_software_single_step(struct gdbarch *gdbarch, gdbarch_software_single_step_ftype software_single_step)
const struct floatformat * floatformats_ieee_single[BFD_ENDIAN_UNKNOWN]
std::unique_ptr< struct regcache > frame_save_as_regcache(struct frame_info *this_frame)
void set_gdbarch_push_dummy_code(struct gdbarch *gdbarch, gdbarch_push_dummy_code_ftype push_dummy_code)
static struct cmd_list_element * infospucmdlist
#define COMPUNIT_BLOCKVECTOR(cust)
struct symbol * fixup_symbol_section(struct symbol *sym, struct objfile *objfile)
int core_addr_lessthan(CORE_ADDR lhs, CORE_ADDR rhs)
struct frame_info * get_next_frame(struct frame_info *this_frame)
void help_list(struct cmd_list_element *list, const char *cmdtype, enum command_class theclass, struct ui_file *stream)
struct value * value_from_pointer(struct type *type, CORE_ADDR addr)
static const struct frame_base spu_frame_base
static void print_frame(struct frame_info *frame, int print_level, enum print_what print_what, int print_args, struct symtab_and_line sal)
void set_gdbarch_pseudo_register_read(struct gdbarch *gdbarch, gdbarch_pseudo_register_read_ftype pseudo_register_read)
ULONGEST align_up(ULONGEST v, int n)
void set_gdbarch_char_signed(struct gdbarch *gdbarch, int char_signed)
#define TYPE_TARGET_TYPE(thistype)
char * phex_nz(ULONGEST l, int sizeof_l)
struct type * builtin_double
void set_gdbarch_address_class_type_flags(struct gdbarch *gdbarch, gdbarch_address_class_type_flags_ftype address_class_type_flags)
static int is_branch(unsigned int insn, int *offset, int *reg)
static int spu_gdbarch_id(struct gdbarch *gdbarch)
static void spu2ppu_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
static CORE_ADDR spu_unwind_sp(struct gdbarch *gdbarch, struct frame_info *next_frame)
static void spu_attach_normal_stop(struct bpstats *bs, int print_frame)
int default_memory_remove_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
void set_gdbarch_address_class_name_to_type_flags(struct gdbarch *gdbarch, gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
static void info_spu_mailbox_command(const char *args, int from_tty)
int xsnprintf(char *str, size_t size, const char *format,...)
static struct gdbarch * spu2ppu_prev_arch(struct frame_info *this_frame, void **this_cache)
#define TYPE_CODE(thistype)
enum register_status regcache_raw_read(struct regcache *regcache, int regnum, gdb_byte *buf)
void regcache_cooked_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
static void spu_pseudo_register_write_spu(struct regcache *regcache, const char *regname, const gdb_byte *buf)
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
CORE_ADDR regcache_read_pc(struct regcache *regcache)
static int spu_scalar_value_p(struct type *type)
struct type * builtin_data_ptr
#define TYPE_CALLING_CONVENTION(thistype)
void set_gdbarch_int_bit(struct gdbarch *gdbarch, int int_bit)
struct minimal_symbol * minsym
static int spu_address_class_type_flags(int byte_size, int dwarf2_addr_class)
static struct value * spu_frame_prev_register(struct frame_info *this_frame, void **this_prologue_cache, int regnum)
#define obj_section_addr(s)
int create_breakpoint(struct gdbarch *gdbarch, const struct event_location *location, const char *cond_string, int thread, const char *extra_string, int parse_extra, int tempflag, enum bptype type_wanted, int ignore_count, enum auto_boolean pending_break_support, const struct breakpoint_ops *ops, int from_tty, int enabled, int internal, unsigned flags)
static int spu_dwarf_reg_to_regnum(struct gdbarch *gdbarch, int reg)
void add_setshow_boolean_cmd(const char *name, enum command_class theclass, int *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 void info_spu_command(const char *args, int from_tty)
void set_gdbarch_virtual_frame_pointer(struct gdbarch *gdbarch, gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
static struct spu_unwind_cache * spu_frame_unwind_cache(struct frame_info *this_frame, void **this_prologue_cache)
void get_frame_register(struct frame_info *frame, int regnum, gdb_byte *buf)
struct value * default_value_from_register(struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_id frame_id)
void set_gdbarch_num_pseudo_regs(struct gdbarch *gdbarch, int num_pseudo_regs)
void dwarf2_append_unwinders(struct gdbarch *gdbarch)
enum register_status regcache_cooked_read(struct regcache *regcache, int regnum, gdb_byte *buf)
static int spu_stop_on_load_p
static void spu_write_pc(struct regcache *regcache, CORE_ADDR pc)
static CORE_ADDR spu_unwind_pc(struct gdbarch *gdbarch, struct frame_info *next_frame)
typedef BP_MANIPULATION(spu_break_insn)
static void spu_overlay_update(struct obj_section *osect)
void set_gdbarch_double_format(struct gdbarch *gdbarch, const struct floatformat **double_format)
void set_gdbarch_memory_remove_breakpoint(struct gdbarch *gdbarch, gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
static void info_spu_mailbox_list(gdb_byte *buf, int nr, enum bfd_endian byte_order, const char *field, const char *msg)
struct inferior * current_inferior(void)
#define SPU_NUM_PSEUDO_REGS
int get_frame_register_bytes(struct frame_info *frame, int regnum, CORE_ADDR offset, int len, gdb_byte *myaddr, int *optimizedp, int *unavailablep)
static void spu_regcache_to_value(struct regcache *regcache, int regnum, struct type *type, gdb_byte *out)
void set_gdbarch_call_dummy_location(struct gdbarch *gdbarch, int call_dummy_location)
unsigned long long ULONGEST
enum unwind_stop_reason default_frame_unwind_stop_reason(struct frame_info *this_frame, void **this_cache)
struct value * call_function_by_hand(struct value *function, type *default_return_type, int nargs, struct value **args)
static int is_rr(unsigned int insn, int op, int *rt, int *ra, int *rb)
int register_size(struct gdbarch *gdbarch, int regnum)
struct observer * observer_attach_normal_stop(observer_normal_stop_ftype *f)
struct observer * observer_attach_new_objfile(observer_new_objfile_ftype *f)
void set_gdbarch_long_double_bit(struct gdbarch *gdbarch, int long_double_bit)
struct type * value_type(const struct value *value)
static const struct objfile_data * spu_overlay_data
struct type * builtin_int64
void set_gdbarch_long_bit(struct gdbarch *gdbarch, int long_bit)
enum register_status regcache_cooked_read_part(struct regcache *regcache, int regnum, int offset, int len, gdb_byte *buf)
void set_gdbarch_return_value(struct gdbarch *gdbarch, gdbarch_return_value_ftype return_value)
LONGEST target_read(struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *buf, ULONGEST offset, LONGEST len)
const struct bfd_arch_info * gdbarch_bfd_arch_info(struct gdbarch *gdbarch)
void set_gdbarch_long_double_format(struct gdbarch *gdbarch, const struct floatformat **long_double_format)
int default_register_reggroup_p(struct gdbarch *gdbarch, int regnum, struct reggroup *group)
struct reggroup *const save_reggroup
#define TYPE_LENGTH(thistype)
void set_gdbarch_ptr_bit(struct gdbarch *gdbarch, int ptr_bit)
enum register_status regcache_raw_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
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 CORE_ADDR spu_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)
void set_gdbarch_sw_breakpoint_from_kind(struct gdbarch *gdbarch, gdbarch_sw_breakpoint_from_kind_ftype sw_breakpoint_from_kind)
#define ALL_OBJFILES(obj)
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)
struct type * builtin_int8
struct symbol * block_lookup_symbol(const struct block *block, const char *name, symbol_name_match_type match_type, const domain_enum domain)
struct bound_minimal_symbol lookup_minimal_symbol(const char *name, const char *sfile, struct objfile *objf)
struct trad_frame_saved_reg * saved_regs
enum bfd_endian byte_order
static int spu_ax_pseudo_register_collect(struct gdbarch *gdbarch, struct agent_expr *ax, int regnum)
void set_gdbarch_pc_regnum(struct gdbarch *gdbarch, int pc_regnum)
int has_stack_frames(void)
void set_gdbarch_register_name(struct gdbarch *gdbarch, gdbarch_register_name_ftype register_name)
static enum register_status spu_pseudo_register_read(struct gdbarch *gdbarch, struct regcache *regcache, int regnum, gdb_byte *buf)
CORE_ADDR get_frame_func(struct frame_info *this_frame)
void error(const char *fmt,...)
struct gdbarch * gdbarch_alloc(const struct gdbarch_info *info, struct gdbarch_tdep *tdep)
#define SPUADDR_ADDR(addr)
void set_gdbarch_inner_than(struct gdbarch *gdbarch, gdbarch_inner_than_ftype inner_than)
static struct type * spu_builtin_type_vec128(struct gdbarch *gdbarch)
static void flush_ea_cache(void)
struct type * lookup_pointer_type(struct type *type)
struct gdbarch * get_frame_arch(struct frame_info *this_frame)
#define FRAME_OBSTACK_CALLOC(NUMBER, TYPE)
void throw_error(enum errors error, const char *fmt,...)
struct type * arch_composite_type(struct gdbarch *gdbarch, const char *name, enum type_code code)
void regcache_cooked_write(struct regcache *regcache, int regnum, const gdb_byte *buf)
struct regcache * get_thread_arch_regcache(ptid_t ptid, struct gdbarch *gdbarch)
struct type * lookup_function_type(struct type *type)
void set_gdbarch_print_insn(struct gdbarch *gdbarch, gdbarch_print_insn_ftype print_insn)
static CORE_ADDR spu_skip_prologue(struct gdbarch *gdbarch, CORE_ADDR pc)
struct type * builtin_float
struct obj_section * sections_end
static void store_unsigned_integer(gdb_byte *addr, int len, enum bfd_endian byte_order, ULONGEST val)
static int is_rrr(unsigned int insn, int op, int *rt, int *ra, int *rb, int *rc)
void regcache_raw_write(struct regcache *regcache, int regnum, const gdb_byte *buf)
static void info_spu_dma_cmdlist(gdb_byte *buf, int nr, enum bfd_endian byte_order)
static int spu2ppu_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)