This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patchv4 1/2] Remove a.out NetBSD and OpenBSD hosta and targets
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: jan dot kratochvil at redhat dot com
- Cc: mark dot kettenis at xs4all dot nl, gdb-patches at sourceware dot org, palves at redhat dot com
- Date: Mon, 23 Sep 2013 22:32:24 +0200 (CEST)
- Subject: Re: [patchv4 1/2] Remove a.out NetBSD and OpenBSD hosta and targets
- Authentication-results: sourceware.org; auth=none
- References: <201309200924 dot r8K9OSa9032694 at glazunov dot sibelius dot xs4all dot nl> <523C0AAC dot 800 at redhat dot com> <20130921131311 dot GA10222 at host2 dot jankratochvil dot net> <20130922122646 dot GA2748 at host2 dot jankratochvil dot net>
> Date: Sun, 22 Sep 2013 14:26:46 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
>
> Hi Mark,
>
> additionally I thought one can remove a.out support from *bsd-{nat,tdep}.c
> files. But then I found in sparcnbsd-tdep.c:
>
> /* 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
>
> OTOH there is even code for ELF BSD core files. Still the patch
> would probably regress OpenBSD so just posting it here as is FYI
> without ChangeLog.
The switch of core files from traditional ("a.out") to ELF format in
OpenBSD was fairly recent, so I don't think it is time yet to do this.