diff options
Diffstat (limited to 'gdb/i386bsd-tdep.c')
-rw-r--r-- | gdb/i386bsd-tdep.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/i386bsd-tdep.c b/gdb/i386bsd-tdep.c index 87d3334..b7e1413 100644 --- a/gdb/i386bsd-tdep.c +++ b/gdb/i386bsd-tdep.c @@ -37,13 +37,15 @@ static CORE_ADDR i386bsd_sigcontext_addr (struct frame_info *this_frame) { + struct gdbarch *gdbarch = get_frame_arch (this_frame); + enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); gdb_byte buf[4]; CORE_ADDR sp; get_frame_register (this_frame, I386_ESP_REGNUM, buf); - sp = extract_unsigned_integer (buf, 4); + sp = extract_unsigned_integer (buf, 4, byte_order); - return read_memory_unsigned_integer (sp + 8, 4); + return read_memory_unsigned_integer (sp + 8, 4, byte_order); } |