aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386nbsd-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/i386nbsd-tdep.c')
-rw-r--r--gdb/i386nbsd-tdep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/i386nbsd-tdep.c b/gdb/i386nbsd-tdep.c
index bb6aaf0..be46b0e 100644
--- a/gdb/i386nbsd-tdep.c
+++ b/gdb/i386nbsd-tdep.c
@@ -234,6 +234,7 @@ i386nbsd_sigtramp_cache_init (const struct tramp_frame *self,
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR sp = get_frame_register_unsigned (this_frame, I386_ESP_REGNUM);
CORE_ADDR base;
int *reg_offset;
@@ -246,7 +247,7 @@ i386nbsd_sigtramp_cache_init (const struct tramp_frame *self,
num_regs = ARRAY_SIZE (i386nbsd_sc_reg_offset);
/* Read in the sigcontext address */
- base = read_memory_unsigned_integer (sp + 8, 4);
+ base = read_memory_unsigned_integer (sp + 8, 4, byte_order);
}
else
{
@@ -254,7 +255,7 @@ i386nbsd_sigtramp_cache_init (const struct tramp_frame *self,
num_regs = ARRAY_SIZE (i386nbsd_mc_reg_offset);
/* Read in the ucontext address */
- base = read_memory_unsigned_integer (sp + 8, 4);
+ base = read_memory_unsigned_integer (sp + 8, 4, byte_order);
/* offsetof(ucontext_t, uc_mcontext) == 36 */
base += 36;
}