* mips-tdep.c (deprecated_mips_set_processor_regs_hack): Use
authorUlrich Weigand <uweigand@de.ibm.com>
Fri, 5 Sep 2008 11:46:12 +0000 (11:46 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Fri, 5 Sep 2008 11:46:12 +0000 (11:46 +0000)
regcache architecture instead of current_gdbarch.

gdb/ChangeLog
gdb/mips-tdep.c

index a3cc8697a032476051750808a6bc208d68b40529..314a4739cf0b1be4ee13193ea91556dee3245c10 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 14e21fb4568fe1d34a7acac35f658fc38bc23d76..615938b60297d2698f9c82d3b7aed2d8ee0fb04c 100644 (file)
@@ -4885,11 +4885,12 @@ set_mipsfpu_auto_command (char *args, int from_tty)
 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;
 }