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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c
index 34e2da0..814faf0 100644
--- a/gdb/remote-m32r-sdi.c
+++ b/gdb/remote-m32r-sdi.c
@@ -917,6 +917,8 @@ static void
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)
@@ -947,7 +949,7 @@ m32r_fetch_register (struct target_ops *ops,
/* 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;