/* Fetch one register. */
static void
-fetch_register (int regno)
+fetch_register (struct regcache *regcache, int regno)
{
int tid;
int val;
if (CANNOT_FETCH_REGISTER (regno))
{
- regcache_raw_supply (current_regcache, regno, NULL);
+ regcache_raw_supply (regcache, regno, NULL);
return;
}
error (_("Couldn't read register %s (#%d): %s."), REGISTER_NAME (regno),
regno, safe_strerror (errno));
- regcache_raw_supply (current_regcache, regno, &val);
+ regcache_raw_supply (regcache, regno, &val);
}
/* Store one register. */
static void
-store_register (int regno)
+store_register (const struct regcache *regcache, int regno)
{
int tid;
int val;
tid = PIDGET (inferior_ptid); /* Not a threaded program. */
errno = 0;
- regcache_raw_collect (current_regcache, regno, &val);
+ regcache_raw_collect (regcache, regno, &val);
ptrace (PTRACE_POKEUSER, tid, hppa_linux_register_addr (regno, 0), val);
if (errno != 0)
error (_("Couldn't write register %s (#%d): %s."), REGISTER_NAME (regno),
point registers depending upon the value of regno. */
static void
-hppa_linux_fetch_inferior_registers (int regno)
+hppa_linux_fetch_inferior_registers (struct regcache *regcache, int regno)
{
if (-1 == regno)
{
for (regno = 0; regno < NUM_REGS; regno++)
- fetch_register (regno);
+ fetch_register (regcache, regno);
}
else
{
- fetch_register (regno);
+ fetch_register (regcache, regno);
}
}
point registers depending upon the value of regno. */
static void
-hppa_linux_store_inferior_registers (int regno)
+hppa_linux_store_inferior_registers (struct regcache *regcache, int regno)
{
if (-1 == regno)
{
for (regno = 0; regno < NUM_REGS; regno++)
- store_register (regno);
+ store_register (regcache, regno);
}
else
{
- store_register (regno);
+ store_register (regcache, regno);
}
}