* disasm.c (gdb_disassemble_info): Initialize disassemble_info
[deliverable/binutils-gdb.git] / gdb / i386bsd-tdep.c
index a76012368cec1708bcaa0daccdffd7f478a01769..c0c544de52d039573317690aaa1608939ad7e58c 100644 (file)
@@ -1,5 +1,5 @@
 /* Target-dependent code for i386 BSD's.
-   Copyright 2001, 2002 Free Software Foundation, Inc.
+   Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,6 +23,7 @@
 #include "frame.h"
 #include "gdbcore.h"
 #include "regcache.h"
+#include "osabi.h"
 
 #include "gdb_string.h"
 
@@ -49,11 +50,13 @@ i386bsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
 CORE_ADDR
 i386bsd_sigcontext_addr (struct frame_info *frame)
 {
-  if (frame->next)
+  struct frame_info *next_frame = get_next_frame (frame);
+
+  if (next_frame)
     /* If this isn't the top frame, the next frame must be for the
        signal handler itself.  A pointer to the sigcontext structure
        is passed as the third argument to the signal handler.  */
-    return read_memory_unsigned_integer (frame->next->frame + 16, 4);
+    return read_memory_unsigned_integer (get_frame_base (next_frame) + 16, 4);
 
   /* This is the top frame.  We'll have to find the address of the
      sigcontext structure by looking at the stack pointer.  */
@@ -195,8 +198,8 @@ _initialize_i386bsd_tdep (void)
   gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_aout_flavour,
                                  i386bsd_aout_osabi_sniffer);
 
-  gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_FREEBSD_AOUT,
+  gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_FREEBSD_AOUT,
                          i386fbsdaout_init_abi);
-  gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_FREEBSD_ELF,
+  gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_FREEBSD_ELF,
                          i386fbsd4_init_abi);
 }
This page took 0.024794 seconds and 4 git commands to generate.