* defs.h (extract_signed_integer, extract_unsigned_integer,
[deliverable/binutils-gdb.git] / gdb / remote-m32r-sdi.c
index 34e2da0df136f2a4385563340046f99ebf4817f0..814faf064c35ad1e8cb39f1561c1c86c4cefdfb7 100644 (file)
@@ -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;
This page took 0.026841 seconds and 4 git commands to generate.