40 #include "floatformat.h"
99 TYPE_NAME (t) =
"spu_builtin_type_vec128";
116 static 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);
200 memset (reg, 0,
sizeof reg);
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)
1003 return *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)
1158 spu_frame_base_address
1208 static struct gdbarch *
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;
1356 int preferred_slot = len < 4 ? 4 - len : 0;
1381 int preferred_slot = len < 4 ? 4 - len : 0;
1412 memset (buf, 0,
sizeof buf);
1421 memset (buf, 0,
sizeof buf);
1427 for (i = 0; i < nargs; i++)
1429 struct value *arg = args[i];
1447 if (stack_arg != -1)
1452 for (i = stack_arg; i < nargs; i++)
1460 for (i = stack_arg; i < nargs; i++)
1462 struct value *arg = args[i];
1468 preferred_slot = len < 4 ? 4 - len : 0;
1486 for (i = 0; i < 4; i++)
1514 int opencl_vector = 0;
1547 error (
_(
"Cannot set function return value."));
1563 error (
_(
"Function return value unknown."));
1580 *lenptr =
sizeof breakpoint;
1646 if ((insn & 0xffffff00) == 0x00002100)
1671 _(
"Could not determine address of "
1672 "single-step breakpoint."));
1675 _(
"Could not determine address of "
1676 "single-step breakpoint."));
1680 target = target & lslr;
1681 if (target != next_pc)
1738 struct disassemble_info spu_info = *info;
1740 data.
gdbarch = info->application_data;
1743 spu_info.application_data = &data;
1745 return print_insn_spu (memaddr, &spu_info);
1801 enum bfd_endian byte_order = bfd_big_endian (objfile->
obfd)?
1802 BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE;
1804 CORE_ADDR ovly_table_base, ovly_buf_table_base;
1805 unsigned ovly_table_size, ovly_buf_table_size;
1816 if (!ovly_table_msym.
minsym)
1821 if (!ovly_buf_table_msym.
minsym)
1830 ovly_table =
xmalloc (ovly_table_size);
1831 read_memory (ovly_table_base, ovly_table, ovly_table_size);
1837 for (i = 0; i < ovly_table_size / 16; i++)
1848 if (buf == 0 || (buf - 1) * 4 >= ovly_buf_table_size)
1855 int ndx = osect - objfile->
sections;
1856 tbl[ndx].
mapped_ptr = ovly_buf_table_base + (buf - 1) * 4;
1872 enum bfd_endian byte_order = bfd_big_endian (osect->
objfile->
obfd)?
1873 BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE;
1926 if (bfd_get_arch (objfile->
obfd) != bfd_arch_spu)
1937 bfd *obfd = objfile->
obfd;
1939 int ndx = osect - objfile->
sections;
1941 if (ovly_table[ndx].mapped_ptr == 0)
1942 bfd_section_lma (obfd, bsect) = bfd_section_vma (obfd, bsect);
1964 if (!objfile || bfd_get_arch (objfile->
obfd) != bfd_arch_spu)
2051 if (msymbol.
minsym != NULL)
2096 error (
_(
"\"info spu\" is only supported on the SPU architecture."));
2100 xsnprintf (annex,
sizeof annex,
"%d/event_status",
id);
2102 buf, 0, (
sizeof (buf) - 1));
2104 error (
_(
"Could not read event_status."));
2106 event_status =
strtoulst ((
char *) buf, NULL, 16);
2108 xsnprintf (annex,
sizeof annex,
"%d/event_mask",
id);
2110 buf, 0, (
sizeof (buf) - 1));
2112 error (
_(
"Could not read event_mask."));
2114 event_mask =
strtoulst ((
char *) buf, NULL, 16);
2121 "0x%s",
phex_nz (event_status, 4));
2123 "0x%s",
phex_nz (event_mask, 4));
2142 int signal1_pending = 0;
2145 int signal2_pending = 0;
2153 error (
_(
"\"info spu\" is only supported on the SPU architecture."));
2157 xsnprintf (annex,
sizeof annex,
"%d/signal1",
id);
2160 error (
_(
"Could not read signal1."));
2164 signal1_pending = 1;
2167 xsnprintf (annex,
sizeof annex,
"%d/signal1_type",
id);
2169 buf, 0, (
sizeof (buf) - 1));
2171 error (
_(
"Could not read signal1_type."));
2173 signal1_type =
strtoulst ((
char *) buf, NULL, 16);
2175 xsnprintf (annex,
sizeof annex,
"%d/signal2",
id);
2178 error (
_(
"Could not read signal2."));
2182 signal2_pending = 1;
2185 xsnprintf (annex,
sizeof annex,
"%d/signal2_type",
id);
2187 buf, 0, (
sizeof (buf) - 1));
2189 error (
_(
"Could not read signal2_type."));
2191 signal2_type =
strtoulst ((
char *) buf, NULL, 16);
2206 if (signal1_pending)
2216 if (signal2_pending)
2232 const char *
field,
const char *msg)
2245 for (i = 0; i < nr; i++)
2274 error (
_(
"\"info spu\" is only supported on the SPU architecture."));
2280 xsnprintf (annex,
sizeof annex,
"%d/mbox_info",
id);
2282 buf, 0,
sizeof buf);
2284 error (
_(
"Could not read mbox_info."));
2287 "mbox",
"SPU Outbound Mailbox");
2289 xsnprintf (annex,
sizeof annex,
"%d/ibox_info",
id);
2291 buf, 0,
sizeof buf);
2293 error (
_(
"Could not read ibox_info."));
2296 "ibox",
"SPU Outbound Interrupt Mailbox");
2298 xsnprintf (annex,
sizeof annex,
"%d/wbox_info",
id);
2300 buf, 0,
sizeof buf);
2302 error (
_(
"Could not read wbox_info."));
2305 "wbox",
"SPU Inbound Mailbox");
2314 return (word >> (63 - last)) & mask;
2320 static char *spu_mfc_opcode[256] =
2322 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2323 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2324 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2325 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2326 "put",
"putb",
"putf", NULL,
"putl",
"putlb",
"putlf", NULL,
2327 "puts",
"putbs",
"putfs", NULL, NULL, NULL, NULL, NULL,
2328 "putr",
"putrb",
"putrf", NULL,
"putrl",
"putrlb",
"putrlf", NULL,
2329 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2330 "get",
"getb",
"getf", NULL,
"getl",
"getlb",
"getlf", NULL,
2331 "gets",
"getbs",
"getfs", NULL, NULL, NULL, NULL, NULL,
2332 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2333 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2334 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2335 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2336 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2337 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2338 "sdcrt",
"sdcrtst", NULL, NULL, NULL, NULL, NULL, NULL,
2339 NULL,
"sdcrz", NULL, NULL, NULL,
"sdcrst", NULL,
"sdcrf",
2340 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2341 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2342 "sndsig",
"sndsigb",
"sndsigf", NULL, NULL, NULL, NULL, NULL,
2343 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2344 "putlluc", NULL, NULL, NULL,
"putllc", NULL, NULL, NULL,
2345 "putqlluc", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2346 "barrier", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2347 "mfceieio", NULL, NULL, NULL,
"mfcsync", NULL, NULL, NULL,
2348 "getllar", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2349 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2350 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2351 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2352 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2353 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
2356 int *seq = alloca (nr *
sizeof (
int));
2363 for (i = 0; i < nr; i++)
2367 for (j = 0; j < nr; j++)
2372 if (done & (1 << (nr - 1 - j)))
2381 if ((dependencies & done) != dependencies)
2385 done |= 1 << (nr - 1 - j);
2412 for (i = 0; i < nr; i++)
2418 int mfc_cmd_opcode, mfc_cmd_tag, rclass_id, tclass_id;
2419 int list_lsa, list_size, mfc_lsa, mfc_size;
2421 int list_valid_p, noop_valid_p, qw_valid_p, ea_valid_p, cmd_error_p;
2453 if (spu_mfc_opcode[mfc_cmd_opcode])
2507 ULONGEST dma_info_stall_and_notify;
2508 ULONGEST dma_info_atomic_command_status;
2516 error (
_(
"\"info spu\" is only supported on the SPU architecture."));
2520 xsnprintf (annex,
sizeof annex,
"%d/dma_info",
id);
2522 buf, 0, 40 + 16 * 32);
2524 error (
_(
"Could not read dma_info."));
2532 dma_info_stall_and_notify
2534 dma_info_atomic_command_status
2546 phex_nz (dma_info_status, 4));
2548 phex_nz (dma_info_stall_and_notify, 4));
2550 phex_nz (dma_info_atomic_command_status, 4));
2554 const char *query_msg =
_(
"no query pending");
2556 if (dma_info_type & 4)
2557 switch (dma_info_type & 3)
2559 case 1: query_msg =
_(
"'any' query pending");
break;
2560 case 2: query_msg =
_(
"'all' query pending");
break;
2561 default: query_msg =
_(
"undefined query type");
break;
2565 phex (dma_info_status, 4));
2567 phex (dma_info_mask, 4), query_msg);
2569 phex (dma_info_stall_and_notify, 4));
2571 phex (dma_info_atomic_command_status, 4));
2595 error (
_(
"\"info spu\" is only supported on the SPU architecture."));
2599 xsnprintf (annex,
sizeof annex,
"%d/proxydma_info",
id);
2601 buf, 0, 24 + 8 * 32);
2603 error (
_(
"Could not read proxydma_info."));
2619 phex_nz (dma_info_status, 4));
2623 const char *query_msg;
2625 switch (dma_info_type & 3)
2627 case 0: query_msg =
_(
"no query pending");
break;
2628 case 1: query_msg =
_(
"'any' query pending");
break;
2629 case 2: query_msg =
_(
"'all' query pending");
break;
2630 default: query_msg =
_(
"undefined query type");
break;
2634 phex (dma_info_status, 4));
2636 phex (dma_info_mask, 4), query_msg);
2648 "the name of an SPU facility.\n"));
2686 static struct gdbarch *
2689 struct gdbarch *gdbarch;
2700 const char *
name = strrchr (info.
abfd->filename,
'@');
2702 sscanf (name,
"@0x%*x <%d>", &
id);
2711 if (tdep && tdep->
id ==
id)
2825 _(
"Various SPU specific commands."),
2826 &setspucmdlist,
"set spu ", 0, &
setlist);
2828 _(
"Various SPU specific commands."),
2829 &showspucmdlist,
"show spu ", 0, &
showlist);
2835 Set whether to stop for new SPE threads."),
2837 Show whether to stop for new SPE threads."),
2839 Use \"on\" to give control to the user when a new SPE thread\n\
2840 enters its \"main\" function.\n\
2841 Use \"off\" to disable stopping for new SPE threads."),
2844 &setspucmdlist, &showspucmdlist);
2850 Set whether to automatically flush the software-managed cache."),
2852 Show whether to automatically flush the software-managed cache."),
2854 Use \"on\" to automatically flush the software-managed cache\n\
2855 whenever SPE execution stops.\n\
2856 Use \"off\" to never automatically flush the software-managed cache."),
2859 &setspucmdlist, &showspucmdlist);
2863 _(
"Various SPU specific commands."),
2864 &infospucmdlist,
"info spu ", 0, &
infolist);
2868 _(
"Display SPU event facility status.\n"),
2871 _(
"Display SPU signal notification facility status.\n"),
2874 _(
"Display SPU mailbox facility status.\n"),
2877 _(
"Display MFC DMA status.\n"),
2880 _(
"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)
ULONGEST extract_unsigned_integer(const gdb_byte *, int, enum bfd_endian)
static void info_spu_proxydma_command(char *args, int from_tty)
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)
struct cmd_list_element * add_prefix_cmd(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc, struct cmd_list_element **prefixlist, const char *prefixname, int allow_unknown, struct cmd_list_element **list)
struct value * call_function_by_hand(struct value *function, int nargs, struct value **args)
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)
#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 spu_overlay_update_osect(struct obj_section *osect)
void ui_out_field_int(struct ui_out *uiout, const char *fldname, int value)
struct frame_info * get_current_frame(void)
struct type * builtin_void
static struct type * spu_register_type(struct gdbarch *gdbarch, int reg_nr)
static int spu_auto_flush_cache_p
int target_write_memory(CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
initialize_file_ftype _initialize_spu_tdep
void print_address(struct gdbarch *, CORE_ADDR, struct ui_file *)
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)
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)
struct gdbarch * get_regcache_arch(const struct regcache *regcache)
static CORE_ADDR spu_read_pc(struct regcache *regcache)
struct bfd_section * the_bfd_section
#define BMSYMBOL_VALUE_ADDRESS(symbol)
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)
struct cleanup * make_cleanup_ui_out_table_begin_end(struct ui_out *ui_out, int nr_cols, int nr_rows, const char *tblid)
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)
struct ui_file * gdb_stdout
static void show_spu_command(char *args, int from_tty)
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 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)
int ui_out_is_mi_like_p(struct ui_out *uiout)
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)
struct regcache * frame_save_as_regcache(struct frame_info *this_frame)
int safe_read_memory_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order, LONGEST *return_value)
#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)
struct type * arch_composite_type(struct gdbarch *gdbarch, char *name, enum type_code code)
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 address_space * get_frame_address_space(struct frame_info *frame)
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_info * tdep_info
static void info_spu_mailbox_command(char *args, int from_tty)
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 ui_out_field_fmt(struct ui_out *uiout, const char *fldname, const char *format,...)
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 void spu_overlay_new_objfile(struct objfile *objfile)
void printf_filtered(const char *format,...)
static void info_spu_signal_command(char *args, int from_tty)
struct regcache * regcache_dup(struct regcache *src)
static int spu_ax_pseudo_register_push_stack(struct gdbarch *gdbarch, struct agent_expr *ax, int regnum)
#define obj_section_addr(s)
#define MSYMBOL_OBJ_SECTION(objfile, symbol)
struct obstack objfile_obstack
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
#define ALL_OBJFILES(obj)
static const gdb_byte * spu_breakpoint_from_pc(struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
struct type * builtin_int128
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 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
static struct spu_overlay_table * spu_get_overlay_table(struct objfile *objfile)
void ui_out_field_skip(struct ui_out *uiout, const char *fldname)
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
void initialize_file_ftype(void)
struct cleanup * make_cleanup_ui_out_tuple_begin_end(struct ui_out *uiout, const char *id)
static int spu_address_class_name_to_type_flags(struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
void fprintf_filtered(struct ui_file *stream, const char *format,...)
void set_gdbarch_stack_frame_destroyed_p(struct gdbarch *gdbarch, gdbarch_stack_frame_destroyed_p_ftype stack_frame_destroyed_p)
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 void info_spu_event_command(char *args, int from_tty)
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)
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t int status
static int spu_software_single_step(struct frame_info *frame)
struct cmd_list_element * showlist
void set_gdbarch_address_to_pointer(struct gdbarch *gdbarch, gdbarch_address_to_pointer_ftype address_to_pointer)
void insert_single_step_breakpoint(struct gdbarch *gdbarch, struct address_space *aspace, CORE_ADDR next_pc)
struct type * builtin_int16
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc, struct cmd_list_element **list)
#define MSYMBOL_SIZE(msymbol)
static void info_spu_dma_command(char *args, int from_tty)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
struct gdbarch * get_objfile_arch(const struct objfile *objfile)
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
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)
void set_gdbarch_breakpoint_from_pc(struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype breakpoint_from_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)
void set_value_offset(struct value *value, int offset)
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)
enum register_status regcache_raw_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
void set_gdbarch_read_pc(struct gdbarch *gdbarch, gdbarch_read_pc_ftype read_pc)
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)
static void info_spu_command(char *args, int from_tty)
struct symbol * block_lookup_symbol(const struct block *block, const char *name, const domain_enum domain)
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)
ULONGEST get_frame_register_unsigned(struct frame_info *frame, int regnum)
struct breakpoint_ops bkpt_breakpoint_ops
struct type * builtin_uint128
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)
int ptid_get_pid(ptid_t ptid)
const struct floatformat * floatformats_ieee_single[BFD_ENDIAN_UNKNOWN]
static void set_spu_command(char *args, int from_tty)
void set_gdbarch_push_dummy_code(struct gdbarch *gdbarch, gdbarch_push_dummy_code_ftype push_dummy_code)
struct trad_frame_saved_reg * trad_frame_alloc_saved_regs(struct frame_info *this_frame)
#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 append_composite_type_field(struct type *t, char *name, struct type *field)
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 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)
int create_breakpoint(struct gdbarch *gdbarch, char *arg, char *cond_string, int thread, char *extra_string, int parse_arg, 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)
#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)
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)
struct obj_section * sections_end
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)
static int spu_dwarf_reg_to_regnum(struct gdbarch *gdbarch, int reg)
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)
void ui_out_table_header(struct ui_out *uiout, int width, enum ui_align alignment, const char *col_name, const char *colhdr)
static void spu_overlay_update(struct obj_section *osect)
void regcache_xfree(struct regcache *regcache)
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)
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)
static int spu_memory_remove_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
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)
const char * core_addr_to_string(const CORE_ADDR addr)
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 ui_out_field_string(struct ui_out *uiout, const char *fldname, const char *string)
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)
void ui_out_table_body(struct ui_out *uiout)
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)
struct ui_out * current_uiout
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 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)
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t int int rusage_t pid_t pid
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,...)
void do_cleanups(struct cleanup *old_chain)
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_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
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
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)
const ULONGEST const LONGEST len
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)