* mips-tdep.c (deprecated_mips_set_processor_regs_hack): Read from
authorUlrich Weigand <uweigand@de.ibm.com>
Fri, 15 Jun 2007 22:29:52 +0000 (22:29 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Fri, 15 Jun 2007 22:29:52 +0000 (22:29 +0000)
current regcache instead of calling read_register.

gdb/ChangeLog
gdb/mips-tdep.c

index 2bd14bf..808c9d4 100644 (file)
@@ -1,5 +1,10 @@
 2007-06-15  Ulrich Weigand  <uweigand@de.ibm.com>
 
+       * mips-tdep.c (deprecated_mips_set_processor_regs_hack): Read from
+       current regcache instead of calling read_register.
+
+2007-06-15  Ulrich Weigand  <uweigand@de.ibm.com>
+
        * mep-tdep.c (current_me_module): Read from current regcache
        instead of calling read_register.
        (current_options): Likewise.
index 288d974..89e91c0 100644 (file)
@@ -4472,10 +4472,10 @@ void
 deprecated_mips_set_processor_regs_hack (void)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-  CORE_ADDR prid;
-
-  prid = read_register (MIPS_PRID_REGNUM);
+  ULONGEST prid;
 
+  regcache_cooked_read_unsigned (current_regcache,
+                                MIPS_PRID_REGNUM, &prid);
   if ((prid & ~0xf) == 0x700)
     tdep->mips_processor_reg_names = mips_r3041_reg_names;
 }