aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-darwin.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/solib-darwin.c')
-rw-r--r--gdb/solib-darwin.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/solib-darwin.c b/gdb/solib-darwin.c
index 17f9547..97cc29c 100644
--- a/gdb/solib-darwin.c
+++ b/gdb/solib-darwin.c
@@ -79,6 +79,7 @@ static void
darwin_load_image_infos (void)
{
gdb_byte buf[24];
+ enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch);
struct type *ptr_type = builtin_type (target_gdbarch)->builtin_data_ptr;
int len;
@@ -97,11 +98,11 @@ darwin_load_image_infos (void)
return;
/* Extract the fields. */
- dyld_all_image.version = extract_unsigned_integer (buf, 4);
+ dyld_all_image.version = extract_unsigned_integer (buf, 4, byte_order);
if (dyld_all_image.version != DYLD_VERSION)
return;
- dyld_all_image.count = extract_unsigned_integer (buf + 4, 4);
+ dyld_all_image.count = extract_unsigned_integer (buf + 4, 4, byte_order);
dyld_all_image.info = extract_typed_address (buf + 8, ptr_type);
dyld_all_image.notifier = extract_typed_address
(buf + 8 + ptr_type->length, ptr_type);