+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
/* 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);
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);
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
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 */
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);
}