aboutsummaryrefslogtreecommitdiff
path: root/gdb/auxv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/auxv.c')
-rw-r--r--gdb/auxv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/auxv.c b/gdb/auxv.c
index 6b98fed..7b4ecbe 100644
--- a/gdb/auxv.c
+++ b/gdb/auxv.c
@@ -82,6 +82,7 @@ default_auxv_parse (struct target_ops *ops, gdb_byte **readptr,
{
const int sizeof_auxv_field = gdbarch_ptr_bit (target_gdbarch)
/ TARGET_CHAR_BIT;
+ const enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch);
gdb_byte *ptr = *readptr;
if (endptr == ptr)
@@ -90,9 +91,9 @@ default_auxv_parse (struct target_ops *ops, gdb_byte **readptr,
if (endptr - ptr < sizeof_auxv_field * 2)
return -1;
- *typep = extract_unsigned_integer (ptr, sizeof_auxv_field);
+ *typep = extract_unsigned_integer (ptr, sizeof_auxv_field, byte_order);
ptr += sizeof_auxv_field;
- *valp = extract_unsigned_integer (ptr, sizeof_auxv_field);
+ *valp = extract_unsigned_integer (ptr, sizeof_auxv_field, byte_order);
ptr += sizeof_auxv_field;
*readptr = ptr;