diff options
author | Mark Kettenis <kettenis@gnu.org> | 2004-01-24 20:55:41 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2004-01-24 20:55:41 +0000 |
commit | 7e5e9f880f7dffe5c9efb63af88fe2819f758350 (patch) | |
tree | 954d0d48909876b2b3419aead360f0e65e2cea9d /gdb/sparcnbsd-tdep.c | |
parent | 7cf03d44ce2b44c88629f4f5b55ca84f015b31d4 (diff) | |
download | gdb-7e5e9f880f7dffe5c9efb63af88fe2819f758350.zip gdb-7e5e9f880f7dffe5c9efb63af88fe2819f758350.tar.gz gdb-7e5e9f880f7dffe5c9efb63af88fe2819f758350.tar.bz2 |
* sparcnbsd-tdep.c (GDB_OSABI_NETBSD_CORE): Define, based on the
value of GDB_OSABI_DEFAULT.
(sparcnbsd_core_osabi_sniffer): Return GDB_OSABI_NETBSD_CORE
instead of GDB_OSABI_NETBSD_AOUT.
Diffstat (limited to 'gdb/sparcnbsd-tdep.c')
-rw-r--r-- | gdb/sparcnbsd-tdep.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/gdb/sparcnbsd-tdep.c b/gdb/sparcnbsd-tdep.c index 2547405..631697c 100644 --- a/gdb/sparcnbsd-tdep.c +++ b/gdb/sparcnbsd-tdep.c @@ -284,11 +284,24 @@ sparcnbsd_aout_osabi_sniffer (bfd *abfd) return GDB_OSABI_UNKNOWN; } +/* OpenBSD uses the traditional NetBSD core file format, even for + ports that use ELF. Therefore, if the default OS ABI is OpenBSD + ELF, we return that instead of NetBSD a.out. This is mainly for + the benfit of OpenBSD/sparc64, which inherits the sniffer below + since we include this file for an OpenBSD/sparc64 target. For + OpenBSD/sparc, the NetBSD a.out OS ABI is probably similar enough + to both the OpenBSD a.out and the OpenBSD ELF OS ABI. */ +#if defined (GDB_OSABI_DEFAULT) && (GDB_OSABI_DEFAULT == GDB_OSABI_OPENBSD_ELF) +#define GDB_OSABI_NETBSD_CORE GDB_OSABI_OPENBSD_ELF +#else +#define GDB_OSABI_NETBSD_CORE GDB_OSABI_NETBSD_AOUT +#endif + 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_NETBSD_CORE; return GDB_OSABI_UNKNOWN; } |