static void
hpux_thread_fetch_registers (struct regcache *regcache, int regno)
{
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
cma__t_int_tcb tcb, *tcb_ptr;
struct cleanup *old_chain;
int i;
if (regno == -1)
{
first_regno = 0;
- last_regno = gdbarch_num_regs (current_gdbarch) - 1;
+ last_regno = gdbarch_num_regs (gdbarch) - 1;
}
else
{
if (regno == HPPA_FLAGS_REGNUM)
/* Flags must be 0 to avoid bogus value for SS_INSYSCALL */
- memset (buf, '\000', register_size (current_gdbarch, regno));
+ memset (buf, '\000', register_size (gdbarch, regno));
else if (regno == HPPA_SP_REGNUM)
store_unsigned_integer (buf, sizeof sp, sp);
else if (regno == HPPA_PCOQ_HEAD_REGNUM)
- read_memory (sp - 20, buf, register_size (current_gdbarch, regno));
+ read_memory (sp - 20, buf, register_size (gdbarch, regno));
else
- read_memory (sp + regmap[regno], buf, register_size (current_gdbarch, regno));
+ read_memory (sp + regmap[regno], buf,
+ register_size (gdbarch, regno));
regcache_raw_supply (regcache, regno, buf);
}
static void
hpux_thread_store_registers (struct regcache *regcache, int regno)
{
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
cma__t_int_tcb tcb, *tcb_ptr;
struct cleanup *old_chain;
int i;
if (regno == -1)
{
first_regno = 0;
- last_regno = gdbarch_num_regs (current_gdbarch) - 1;
+ last_regno = gdbarch_num_regs (gdbarch) - 1;
}
else
{
{
regcache_raw_collect (regcache, regno, buf);
write_memory ((CORE_ADDR) &tcb_ptr->static_ctx.sp, buf,
- register_size (current_gdbarch, regno));
+ register_size (gdbarch, regno));
tcb_ptr->static_ctx.sp
= (cma__t_hppa_regs *) ((CORE_ADDR) buf + 160);
}
{
regcache_raw_collect (regcache, regno, buf);
write_memory (sp - 20, buf,
- register_size (current_gdbarch, regno));
+ register_size (gdbarch, regno));
}
else
{
regcache_raw_collect (regcache, regno, buf);
write_memory (sp + regmap[regno], buf,
- register_size (current_gdbarch, regno));
+ register_size (gdbarch, regno));
}
}
}