diff options
author | Mark Kettenis <kettenis@gnu.org> | 2004-01-22 22:57:59 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2004-01-22 22:57:59 +0000 |
commit | 89aac506c25976bbedcb92aa944a14ea7398e477 (patch) | |
tree | 2f05f4879f24162df005ef60cd29f96a47760423 /gdb/sparcnbsd-tdep.c | |
parent | 36662fde7b36c1effab525806db6f51d1356eb2b (diff) | |
download | gdb-89aac506c25976bbedcb92aa944a14ea7398e477.zip gdb-89aac506c25976bbedcb92aa944a14ea7398e477.tar.gz gdb-89aac506c25976bbedcb92aa944a14ea7398e477.tar.bz2 |
* sparcnbsd-tdep.c (sparcnbsd_core_osabi_sniffer): New function.
(_initialize_sparnbsd_tdep): Register sparcnbsd_core_osabi_sniffer.
Diffstat (limited to 'gdb/sparcnbsd-tdep.c')
-rw-r--r-- | gdb/sparcnbsd-tdep.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/sparcnbsd-tdep.c b/gdb/sparcnbsd-tdep.c index 4ea3901..80e3db5 100644 --- a/gdb/sparcnbsd-tdep.c +++ b/gdb/sparcnbsd-tdep.c @@ -284,6 +284,15 @@ sparcnbsd_aout_osabi_sniffer (bfd *abfd) return GDB_OSABI_UNKNOWN; } +static enum gdb_osabi +sparcnbsd_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_sparcnbsd_tdep (void); @@ -294,6 +303,11 @@ _initialize_sparnbsd_tdep (void) gdbarch_register_osabi_sniffer (bfd_arch_sparc, bfd_target_aout_flavour, sparcnbsd_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, + sparcnbsd_core_osabi_sniffer); + gdbarch_register_osabi (bfd_arch_sparc, 0, GDB_OSABI_NETBSD_AOUT, sparc32nbsd_aout_init_abi); gdbarch_register_osabi (bfd_arch_sparc, 0, GDB_OSABI_NETBSD_ELF, |