aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386bsd-tdep.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2003-12-26 17:59:48 +0000
committerMark Kettenis <kettenis@gnu.org>2003-12-26 17:59:48 +0000
commitf6943e4a1d18d45ef98400032e606499209710ee (patch)
tree759b32cc76ae1f4db9674a2bd47bf4a9e6c3c68f /gdb/i386bsd-tdep.c
parent2f9c405836dd24090e3229c64b43e0f615f1048b (diff)
downloadgdb-f6943e4a1d18d45ef98400032e606499209710ee.zip
gdb-f6943e4a1d18d45ef98400032e606499209710ee.tar.gz
gdb-f6943e4a1d18d45ef98400032e606499209710ee.tar.bz2
* i386bsd-tdep.c (i386bsd_core_osabi_sniffer): New function.
(_initialize_i386bsd_tdep): Register i386bsd_core_osabi_sniffer.
Diffstat (limited to 'gdb/i386bsd-tdep.c')
-rw-r--r--gdb/i386bsd-tdep.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/i386bsd-tdep.c b/gdb/i386bsd-tdep.c
index 80739cf..67d09ee 100644
--- a/gdb/i386bsd-tdep.c
+++ b/gdb/i386bsd-tdep.c
@@ -144,6 +144,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;
+}
+
/* Provide a prototype to silence -Wmissing-prototypes. */
void _initialize_i386bsd_tdep (void);
@@ -153,4 +162,9 @@ _initialize_i386bsd_tdep (void)
{
gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_aout_flavour,
i386bsd_aout_osabi_sniffer);
+
+ /* BFD doesn't set the architecture for NetBSD style a.out core
+ files. */
+ gdbarch_register_osabi_sniffer (bfd_arch_unknown, bfd_target_unknown_flavour,
+ i386bsd_core_osabi_sniffer);
}