X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fi386bsd-tdep.c;h=15809b3b9a61ec1724ee10a2ca810ee21d2feccf;hb=6290672f89d5638a9da5ce10b2f4ba793dcc6396;hp=87d33343ac6a1823a19ff5293286a1d89533f1a7;hpb=0fb0cc7590113e9b459dfcc48dc71c9d419d9580;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/i386bsd-tdep.c b/gdb/i386bsd-tdep.c index 87d33343ac..15809b3b9a 100644 --- a/gdb/i386bsd-tdep.c +++ b/gdb/i386bsd-tdep.c @@ -1,7 +1,6 @@ /* Target-dependent code for i386 BSD's. - Copyright (C) 2001, 2002, 2003, 2004, 2007, 2008, 2009 - Free Software Foundation, Inc. + Copyright (C) 2001-2016 Free Software Foundation, Inc. This file is part of GDB. @@ -25,8 +24,6 @@ #include "regcache.h" #include "osabi.h" -#include "gdb_string.h" - #include "i386-tdep.h" /* Support for signal handlers. */ @@ -37,13 +34,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); }