aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386-nto-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/i386-nto-tdep.c')
-rw-r--r--gdb/i386-nto-tdep.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/i386-nto-tdep.c b/gdb/i386-nto-tdep.c
index 0528931..aaa47f1 100644
--- a/gdb/i386-nto-tdep.c
+++ b/gdb/i386-nto-tdep.c
@@ -293,12 +293,14 @@ i386nto_sigtramp_p (struct frame_info *this_frame)
static CORE_ADDR
i386nto_sigcontext_addr (struct frame_info *this_frame)
{
+ struct gdbarch *gdbarch = get_frame_arch (this_frame);
+ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
char buf[4];
CORE_ADDR ptrctx;
/* We store __ucontext_t addr in EDI register. */
get_frame_register (this_frame, I386_EDI_REGNUM, buf);
- ptrctx = extract_unsigned_integer (buf, 4);
+ ptrctx = extract_unsigned_integer (buf, 4, byte_order);
ptrctx += 24 /* Context pointer is at this offset. */;
return ptrctx;