aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2008-09-05 11:46:12 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2008-09-05 11:46:12 +0000
commitbb48619059cec6b2fc701e339dc89c77ff3e0095 (patch)
tree9f0f7c4e99eea28280d2a552dcf3ea218a7e1d49 /gdb
parent9dacea90b2a61b4a84d3379ec523e82b5c18f184 (diff)
downloadfsf-binutils-gdb-bb48619059cec6b2fc701e339dc89c77ff3e0095.zip
fsf-binutils-gdb-bb48619059cec6b2fc701e339dc89c77ff3e0095.tar.gz
fsf-binutils-gdb-bb48619059cec6b2fc701e339dc89c77ff3e0095.tar.bz2
* mips-tdep.c (deprecated_mips_set_processor_regs_hack): Use
regcache architecture instead of current_gdbarch.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/mips-tdep.c7
2 files changed, 9 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a3cc869..314a473 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
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.
(check_for_saved): Use it instead of current_gdbarch.
(is_arg_spill): Add gdbarch paramter. Use it instead
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 14e21fb..615938b 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -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;
}