* ld-cris/expdyn1.d, ld-cris/expdyn5.d, ld-cris/expdyn6.d,
[deliverable/binutils-gdb.git] / gdb / i386bsd-tdep.c
index 80739cf572de352b510197229887ff8d0e95f628..4b4bffbb4fdc1103ec3f696a76b5c69910201e43 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for i386 BSD's.
 
-   Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 
 /* Support for signal handlers.  */
 
-/* Return whether PC is in a BSD sigtramp routine.  */
-
-static int
-i386bsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
-  return (pc >= tdep->sigtramp_start && pc < tdep->sigtramp_end);
-}
-
 /* Assuming NEXT_FRAME is for a frame following a BSD sigtramp
    routine, return the address of the associated sigcontext structure.  */
 
@@ -56,22 +46,6 @@ i386bsd_sigcontext_addr (struct frame_info *next_frame)
 
   return read_memory_unsigned_integer (sp + 8, 4);
 }
-
-/* Return the start address of the sigtramp routine.  */
-
-CORE_ADDR
-i386bsd_sigtramp_start (CORE_ADDR pc)
-{
-  return gdbarch_tdep (current_gdbarch)->sigtramp_start;
-}
-
-/* Return the end address of the sigtramp routine.  */
-
-CORE_ADDR
-i386bsd_sigtramp_end (CORE_ADDR pc)
-{
-  return gdbarch_tdep (current_gdbarch)->sigtramp_end;
-}
 \f
 
 /* Support for shared libraries.  */
@@ -112,12 +86,6 @@ i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
-  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);
@@ -144,6 +112,15 @@ i386bsd_aout_osabi_sniffer (bfd *abfd)
   return GDB_OSABI_UNKNOWN;
 }
 
+static enum gdb_osabi
+i386bsd_core_osabi_sniffer (bfd *abfd)
+{
+  if (strcmp (bfd_get_target (abfd), "netbsd-core") == 0)
+    return GDB_OSABI_NETBSD_AOUT;
+
+  return GDB_OSABI_UNKNOWN;
+}
+
 \f
 /* Provide a prototype to silence -Wmissing-prototypes.  */
 void _initialize_i386bsd_tdep (void);
@@ -153,4 +130,8 @@ _initialize_i386bsd_tdep (void)
 {
   gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_aout_flavour,
                                  i386bsd_aout_osabi_sniffer);
+
+  /* BFD doesn't set a flavour for NetBSD style a.out core files.  */
+  gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_unknown_flavour,
+                                 i386bsd_core_osabi_sniffer);
 }
This page took 0.024194 seconds and 4 git commands to generate.