aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-m32r-sdi.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/remote-m32r-sdi.c')
-rw-r--r--gdb/remote-m32r-sdi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c
index dc1e6a0..25d5dc9 100644
--- a/gdb/remote-m32r-sdi.c
+++ b/gdb/remote-m32r-sdi.c
@@ -908,7 +908,9 @@ m32r_fetch_registers (struct regcache *regcache)
{
int regno;
- for (regno = 0; regno < gdbarch_num_regs (current_gdbarch); regno++)
+ for (regno = 0;
+ regno < gdbarch_num_regs (get_regcache_arch (regcache));
+ regno++)
m32r_fetch_register (regcache, regno);
}
@@ -957,7 +959,9 @@ m32r_store_registers (struct regcache *regcache)
{
int regno;
- for (regno = 0; regno < gdbarch_num_regs (current_gdbarch); regno++)
+ for (regno = 0;
+ regno < gdbarch_num_regs (get_regcache_arch (regcache));
+ regno++)
m32r_store_register (regcache, regno);
registers_changed ();