44 #define spu_standalone_p() \ 45 (symfile_objfile && symfile_objfile->obfd \ 46 && bfd_get_arch (symfile_objfile->obfd) == bfd_arch_spu) 49 #define INSTR_SC 0x44000002 50 #define NR_spu_run 0x0116 107 info.
bfd_arch_info = bfd_lookup_arch (bfd_arch_spu, bfd_mach_spu);
183 buf, spufs_addr,
sizeof buf) ==
sizeof buf)
188 if (regno == -1 || (regno >= 0 && regno <
SPU_NUM_GPRS))
194 xsnprintf (annex,
sizeof annex,
"%d/regs", spufs_fd);
196 buf, 0,
sizeof buf) ==
sizeof buf)
235 buf, spufs_addr,
sizeof buf);
239 if (regno == -1 || (regno >= 0 && regno <
SPU_NUM_GPRS))
248 xsnprintf (annex,
sizeof annex,
"%d/regs", spufs_fd);
257 const char *annex,
gdb_byte *readbuf,
268 char mem_annex[32], lslr_annex[32];
275 xsnprintf (mem_annex,
sizeof mem_annex,
"%d/mem", fd);
277 mem_annex, readbuf, writebuf,
278 addr, len, xfered_len);
286 xsnprintf (lslr_annex,
sizeof lslr_annex,
"%d/lslr", fd);
287 memset (buf, 0,
sizeof buf);
289 lslr_annex, buf, NULL,
290 0,
sizeof buf, xfered_len)
294 lslr =
strtoulst ((
char *) buf, NULL, 16);
296 mem_annex, readbuf, writebuf,
297 addr & lslr, len, xfered_len);
302 readbuf, writebuf,
offset, len, xfered_len);
317 start_addr, search_space_len,
318 pattern, pattern_len, found_addrp);
321 start_addr, search_space_len,
322 pattern, pattern_len, found_addrp);
362 if (so->
abfd && bfd_get_arch (so->
abfd) == bfd_arch_spu)
371 if (so->
abfd && bfd_get_arch (so->
abfd) == bfd_arch_spu)
struct gdbarch * target_gdbarch(void)
static struct gdbarch * spu_gdbarch(int spufs_fd)
static void spu_mourn_inferior(struct target_ops *ops)
static void spu_multiarch_solib_loaded(struct so_list *so)
regcache(gdbarch *gdbarch)
#define SPUADDR_SPU(addr)
static struct gdbarch * spu_thread_architecture(struct target_ops *ops, ptid_t ptid)
LONGEST target_write(struct target_ops *ops, enum target_object object, const char *annex, const gdb_byte *buf, ULONGEST offset, LONGEST len)
void push_target(struct target_ops *t)
ptid_t regcache_get_ptid(const struct regcache *regcache)
int unpush_target(struct target_ops *t)
struct gdbarch * gdbarch_find_by_info(struct gdbarch_info info)
void * memset(T *s, int c, size_t n)=delete
struct inferior * find_inferior_ptid(ptid_t ptid)
int(* to_region_ok_for_hw_watchpoint)(struct target_ops *, CORE_ADDR, int) TARGET_DEFAULT_FUNC(default_region_ok_for_hw_watchpoint)
const struct bfd_arch_info * bfd_arch_info
struct gdbarch_tdep * gdbarch_tdep(struct gdbarch *gdbarch)
static struct target_ops spu_ops
static void spu_multiarch_solib_unloaded(struct so_list *so)
scoped_restore_tmpl< T > make_scoped_restore(T *var)
static void spu_store_registers(struct target_ops *ops, struct regcache *regcache, int regno)
struct observer * observer_attach_inferior_created(observer_inferior_created_ftype *f)
static void spu_multiarch_deactivate(void)
void complete_target_initialization(struct target_ops *t)
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 observer * observer_attach_solib_unloaded(observer_solib_unloaded_ftype *f)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
static int parse_spufs_run(ptid_t ptid, int *fd, CORE_ADDR *addr)
enum target_xfer_status(* to_xfer_partial)(struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len) TARGET_DEFAULT_RETURN(TARGET_XFER_E_IO)
ULONGEST strtoulst(const char *num, const char **trailer, int base)
int(* to_search_memory)(struct target_ops *ops, CORE_ADDR start_addr, ULONGEST search_space_len, const gdb_byte *pattern, ULONGEST pattern_len, CORE_ADDR *found_addrp) TARGET_DEFAULT_FUNC(default_search_memory)
struct target_ops * find_target_beneath(struct target_ops *t)
static void spu_fetch_registers(struct target_ops *ops, struct regcache *regcache, int regno)
#define spu_standalone_p()
static enum target_xfer_status spu_xfer_partial(struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len)
int simple_search_memory(struct target_ops *ops, CORE_ADDR start_addr, ULONGEST search_space_len, const gdb_byte *pattern, ULONGEST pattern_len, CORE_ADDR *found_addrp)
void(* to_fetch_registers)(struct target_ops *, struct regcache *, int) TARGET_DEFAULT_IGNORE()
void(* to_mourn_inferior)(struct target_ops *) TARGET_DEFAULT_FUNC(default_mourn_inferior)
int xsnprintf(char *str, size_t size, const char *format,...)
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
void gdbarch_info_init(struct gdbarch_info *info)
static void init_spu_ops(void)
CORE_ADDR regcache_read_pc(struct regcache *regcache)
void registers_changed(void)
struct gdbarch *(* to_thread_architecture)(struct target_ops *, ptid_t) TARGET_DEFAULT_FUNC(default_thread_architecture)
void regcache_raw_supply(struct regcache *regcache, int regnum, const void *buf)
const char * to_shortname
unsigned long long ULONGEST
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 regcache_raw_collect(const struct regcache *regcache, int regnum, void *buf)
static int spu_region_ok_for_hw_watchpoint(struct target_ops *self, CORE_ADDR addr, int len)
enum bfd_endian byte_order
void(* to_store_registers)(struct target_ops *, struct regcache *, int) TARGET_DEFAULT_NORETURN(noprocess())
enum bfd_endian byte_order
static void spu_multiarch_activate(void)
void _initialize_spu_multiarch(void)
#define SPUADDR_ADDR(addr)
struct observer * observer_attach_solib_loaded(observer_solib_loaded_ftype *f)
struct regcache * get_thread_arch_regcache(ptid_t ptid, struct gdbarch *gdbarch)
static int spu_search_memory(struct target_ops *ops, CORE_ADDR start_addr, ULONGEST search_space_len, const gdb_byte *pattern, ULONGEST pattern_len, CORE_ADDR *found_addrp)
static void store_unsigned_integer(gdb_byte *addr, int len, enum bfd_endian byte_order, ULONGEST val)
static void spu_multiarch_inferior_created(struct target_ops *ops, int from_tty)