From: Mark Kettenis Date: Sat, 24 Jan 2004 20:55:41 +0000 (+0000) Subject: * sparcnbsd-tdep.c (GDB_OSABI_NETBSD_CORE): Define, based on the X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7e5e9f880f7dffe5c9efb63af88fe2819f758350;p=binutils-gdb.git * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 543cd7f759b..08e5395495c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2004-01-24 Mark Kettenis + + * 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. + 2004-01-24 Nick Roberts * mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-cmds.h: Update diff --git a/gdb/sparcnbsd-tdep.c b/gdb/sparcnbsd-tdep.c index 2547405ac55..631697c1799 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; }