+2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * mips-tdep.c (deprecated_mips_set_processor_regs_hack): Use
+ regcache architecture instead of current_gdbarch.
+
2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
* mep-tdep.c (struct mep_prologue): Add gdbarch member.
void
deprecated_mips_set_processor_regs_hack (void)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct regcache *regcache = get_current_regcache ();
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
ULONGEST prid;
- regcache_cooked_read_unsigned (get_current_regcache (),
- MIPS_PRID_REGNUM, &prid);
+ regcache_cooked_read_unsigned (regcache, MIPS_PRID_REGNUM, &prid);
if ((prid & ~0xf) == 0x700)
tdep->mips_processor_reg_names = mips_r3041_reg_names;
}