aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-10-09 18:17:31 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-10-09 18:17:31 +0000
commit9b072297d839dae1448ecaccc3480c720cfc4c35 (patch)
treeacd4c92a47e53c582c0b1f8117339941266564b6
parente76e7474e6bb2e461518c29798fd6693a076dfa9 (diff)
downloadfsf-binutils-gdb-9b072297d839dae1448ecaccc3480c720cfc4c35.zip
fsf-binutils-gdb-9b072297d839dae1448ecaccc3480c720cfc4c35.tar.gz
fsf-binutils-gdb-9b072297d839dae1448ecaccc3480c720cfc4c35.tar.bz2
2007-10-09 Markus Deuling <deuling@de.ibm.com>
* monitor.c (monitor_supply_register): Use get_regcache_arch to get at the current architecture by regcache. (monitor_store_register, monitor_store_registers): Likewise.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/monitor.c15
2 files changed, 16 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f4380b6..10de53b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2007-10-09 Markus Deuling <deuling@de.ibm.com>
+ * monitor.c (monitor_supply_register): Use get_regcache_arch to get at
+ the current architecture by regcache.
+ (monitor_store_register, monitor_store_registers): Likewise.
+
+2007-10-09 Markus Deuling <deuling@de.ibm.com>
+
* dbug-rom.c (dbug_supply_register): Use get_regcache_arch to get at
the current architecture by regcache.
diff --git a/gdb/monitor.c b/gdb/monitor.c
index 33ba8c5..410ce62 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -883,7 +883,9 @@ monitor_supply_register (struct regcache *regcache, int regno, char *valstr)
/* supply register stores in target byte order, so swap here */
- store_unsigned_integer (regbuf, register_size (current_gdbarch, regno), val);
+ store_unsigned_integer (regbuf,
+ register_size (get_regcache_arch (regcache), regno),
+ val);
regcache_raw_supply (regcache, regno, regbuf);
@@ -1190,7 +1192,7 @@ monitor_fetch_register (struct regcache *regcache, int regno)
spaces, but stop reading if something else is seen. Some monitors
like to drop leading zeros. */
- for (i = 0; i < register_size (current_gdbarch, regno) * 2; i++)
+ for (i = 0; i < register_size (get_regcache_arch (regcache), regno) * 2; i++)
{
int c;
c = readchar (timeout);
@@ -1277,7 +1279,8 @@ monitor_fetch_registers (struct regcache *regcache, int regno)
return;
}
- for (regno = 0; regno < gdbarch_num_regs (current_gdbarch); regno++)
+ for (regno = 0; regno < gdbarch_num_regs (get_regcache_arch (regcache));
+ regno++)
monitor_fetch_register (regcache, regno);
}
else
@@ -1307,7 +1310,8 @@ monitor_store_register (struct regcache *regcache, int regno)
regcache_cooked_read_unsigned (regcache, regno, &val);
monitor_debug ("MON storeg %d %s\n", regno,
- phex (val, register_size (current_gdbarch, regno)));
+ phex (val,
+ register_size (get_regcache_arch (regcache), regno)));
/* send the register deposit command */
@@ -1354,7 +1358,8 @@ monitor_store_registers (struct regcache *regcache, int regno)
return;
}
- for (regno = 0; regno < gdbarch_num_regs (current_gdbarch); regno++)
+ for (regno = 0; regno < gdbarch_num_regs (get_regcache_arch (regcache));
+ regno++)
monitor_store_register (regcache, regno);
}