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
97 info.
bfd_arch_info = bfd_lookup_arch (bfd_arch_spu, bfd_mach_spu);
167 buf, spufs_addr,
sizeof buf) ==
sizeof buf)
172 if (regno == -1 || (regno >= 0 && regno <
SPU_NUM_GPRS))
178 xsnprintf (annex,
sizeof annex,
"%d/regs", spufs_fd);
180 buf, 0,
sizeof buf) ==
sizeof buf)
214 buf, spufs_addr,
sizeof buf);
218 if (regno == -1 || (regno >= 0 && regno <
SPU_NUM_GPRS))
227 xsnprintf (annex,
sizeof annex,
"%d/regs", spufs_fd);
236 const char *annex,
gdb_byte *readbuf,
247 char mem_annex[32], lslr_annex[32];
254 xsnprintf (mem_annex,
sizeof mem_annex,
"%d/mem", fd);
256 mem_annex, readbuf, writebuf,
257 addr, len, xfered_len);
265 xsnprintf (lslr_annex,
sizeof lslr_annex,
"%d/lslr", fd);
266 memset (buf, 0,
sizeof buf);
268 lslr_annex, buf, NULL,
269 0,
sizeof buf, xfered_len)
273 lslr =
strtoulst ((
char *) buf, NULL, 16);
275 mem_annex, readbuf, writebuf,
276 addr & lslr, len, xfered_len);
281 readbuf, writebuf, offset, len, xfered_len);
296 start_addr, search_space_len,
297 pattern, pattern_len, found_addrp);
300 start_addr, search_space_len,
301 pattern, pattern_len, found_addrp);
341 if (so->
abfd && bfd_get_arch (so->
abfd) == bfd_arch_spu)
350 if (so->
abfd && bfd_get_arch (so->
abfd) == bfd_arch_spu)
struct gdbarch * target_gdbarch(void)
static struct gdbarch * spu_gdbarch(int spufs_fd)
ULONGEST extract_unsigned_integer(const gdb_byte *, int, enum bfd_endian)
static void spu_mourn_inferior(struct target_ops *ops)
static void spu_multiarch_solib_loaded(struct so_list *so)
struct gdbarch * get_regcache_arch(const struct regcache *regcache)
#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)
int unpush_target(struct target_ops *t)
struct gdbarch * gdbarch_find_by_info(struct gdbarch_info info)
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_info * tdep_info
struct gdbarch_tdep * gdbarch_tdep(struct gdbarch *gdbarch)
static struct target_ops spu_ops
void store_unsigned_integer(gdb_byte *, int, enum bfd_endian, ULONGEST)
static void spu_multiarch_solib_unloaded(struct so_list *so)
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 initialize_file_ftype(void)
void complete_target_initialization(struct target_ops *t)
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)
initialize_file_ftype _initialize_spu_multiarch
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)
const char const char int
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)
#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)
const ULONGEST const LONGEST len
static void spu_multiarch_inferior_created(struct target_ops *ops, int from_tty)