/* Override the fetch_inferior_register routine. */
static void
-spu_fetch_inferior_registers (int regno)
+spu_fetch_inferior_registers (struct regcache *regcache, int regno)
{
int fd;
CORE_ADDR addr;
{
char buf[4];
store_unsigned_integer (buf, 4, fd);
- regcache_raw_supply (current_regcache, SPU_ID_REGNUM, buf);
+ regcache_raw_supply (regcache, SPU_ID_REGNUM, buf);
}
/* The NPC register is found at ADDR. */
{
gdb_byte buf[4];
if (fetch_ppc_memory (addr, buf, 4) == 0)
- regcache_raw_supply (current_regcache, SPU_PC_REGNUM, buf);
+ regcache_raw_supply (regcache, SPU_PC_REGNUM, buf);
}
/* The GPRs are found in the "regs" spufs file. */
xsnprintf (annex, sizeof annex, "%d/regs", fd);
if (spu_proc_xfer_spu (annex, buf, NULL, 0, sizeof buf) == sizeof buf)
for (i = 0; i < SPU_NUM_GPRS; i++)
- regcache_raw_supply (current_regcache, i, buf + i*16);
+ regcache_raw_supply (regcache, i, buf + i*16);
}
}
/* Override the store_inferior_register routine. */
static void
-spu_store_inferior_registers (int regno)
+spu_store_inferior_registers (struct regcache *regcache, int regno)
{
int fd;
CORE_ADDR addr;
if (regno == -1 || regno == SPU_PC_REGNUM)
{
gdb_byte buf[4];
- regcache_raw_collect (current_regcache, SPU_PC_REGNUM, buf);
+ regcache_raw_collect (regcache, SPU_PC_REGNUM, buf);
store_ppc_memory (addr, buf, 4);
}
int i;
for (i = 0; i < SPU_NUM_GPRS; i++)
- regcache_raw_collect (current_regcache, i, buf + i*16);
+ regcache_raw_collect (regcache, i, buf + i*16);
xsnprintf (annex, sizeof annex, "%d/regs", fd);
spu_proc_xfer_spu (annex, NULL, buf, 0, sizeof buf);