make MSYMBOL_VALUE_ADDRESS an rvalue
[deliverable/binutils-gdb.git] / gdb / i386obsd-nat.c
index 016cebd86c9f520c448e2321d26d064ad52618f8..f4d07fe202c229d7a5857b9c4a2d108afa4b95ee 100644 (file)
@@ -1,7 +1,6 @@
 /* Native-dependent code for OpenBSD/i386.
 
-   Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008
-   Free Software Foundation, Inc.
+   Copyright (C) 2002-2014 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,7 +22,6 @@
 #include "regcache.h"
 #include "target.h"
 
-#include <sys/param.h>
 #include <sys/sysctl.h>
 #include <machine/frame.h>
 #include <machine/pcb.h>
@@ -35,6 +33,8 @@
 static int
 i386obsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
 {
+  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   struct switchframe sf;
 
   /* The following is true for OpenBSD 3.6:
@@ -76,8 +76,8 @@ i386obsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
     {
       /* No, the pcb must have been last updated by savectx().  */
       pcb->pcb_esp = pcb->pcb_ebp;
-      pcb->pcb_ebp = read_memory_integer(pcb->pcb_esp, 4);
-      sf.sf_eip = read_memory_integer(pcb->pcb_esp + 4, 4);
+      pcb->pcb_ebp = read_memory_integer(pcb->pcb_esp, 4, byte_order);
+      sf.sf_eip = read_memory_integer(pcb->pcb_esp + 4, 4, byte_order);
       regcache_raw_supply (regcache, I386_EIP_REGNUM, &sf.sf_eip);
     }
 
This page took 0.024401 seconds and 4 git commands to generate.