m32r_fetch_register (struct target_ops *ops,
struct regcache *regcache, int regno)
{
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
unsigned long val, val2, regid;
if (regno == -1)
/* We got the number the register holds, but gdb expects to see a
value in the target byte ordering. */
- store_unsigned_integer (buffer, 4, val);
+ store_unsigned_integer (buffer, 4, byte_order, val);
regcache_raw_supply (regcache, regno, buffer);
}
return;
{
if (write)
fprintf_unfiltered (gdb_stdlog, "m32r_xfer_memory(%s,%d,write)\n",
- paddr (memaddr), len);
+ paddress (target_gdbarch, memaddr), len);
else
fprintf_unfiltered (gdb_stdlog, "m32r_xfer_memory(%s,%d,read)\n",
- paddr (memaddr), len);
+ paddress (target_gdbarch, memaddr), len);
}
if (write)
if (remote_debug)
fprintf_unfiltered (gdb_stdlog, "m32r_insert_breakpoint(%s,...)\n",
- paddr (addr));
+ paddress (gdbarch, addr));
if (use_ib_breakpoints)
ib_breakpoints = max_ib_breakpoints;
if (remote_debug)
fprintf_unfiltered (gdb_stdlog, "m32r_remove_breakpoint(%s)\n",
- paddr (addr));
+ paddress (gdbarch, addr));
for (i = 0; i < MAX_BREAKPOINTS; i++)
{
if (remote_debug)
fprintf_unfiltered (gdb_stdlog, "m32r_insert_watchpoint(%s,%d,%d)\n",
- paddr (addr), len, type);
+ paddress (target_gdbarch, addr), len, type);
for (i = 0; i < MAX_ACCESS_BREAKS; i++)
{
if (remote_debug)
fprintf_unfiltered (gdb_stdlog, "m32r_remove_watchpoint(%s,%d,%d)\n",
- paddr (addr), len, type);
+ paddress (target_gdbarch, addr), len, type);
for (i = 0; i < MAX_ACCESS_BREAKS; i++)
{