/* 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.
#include "frame.h"
#include "gdbcore.h"
#include "regcache.h"
+#include "osabi.h"
#include "gdb_string.h"
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. */
set_gdbarch_pc_in_sigtramp (gdbarch, i386bsd_pc_in_sigtramp);
+ /* Allow the recognition of sigtramps as a function named <sigtramp>. */
+ set_gdbarch_sigtramp_start (gdbarch, i386bsd_sigtramp_start);
+ set_gdbarch_sigtramp_end (gdbarch, i386bsd_sigtramp_end);
+
/* Assume SunOS-style shared libraries. */
set_gdbarch_in_solib_call_trampoline (gdbarch,
i386bsd_aout_in_solib_call_trampoline);
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);
}