[PATCH 2/8] bfd/binutils: support for gdb target descriptions in the core file

Jim Wilson jimw@sifive.com
Wed Dec 2 22:58:35 GMT 2020


On Wed, Dec 2, 2020 at 10:21 AM Luis Machado via Gdb-patches <
gdb-patches@sourceware.org> wrote:

> For the constant, I find the magic number amusing, but I don't think it
> does any good when you're trying to find out why that particular magic
> number was picked, and what the next number should be.
>
> Should we go with the basic increasing ID instead? I think this would be
> 7, right after NT_AUXV.
>

7 is NT_FREEBSD_THRMISC which would prevent use of this on FreeBSD.  I know
this is primarily for bare metal core files, but it might be useful for
linux and *bsd systems that have different register sets, because of
different extensions, with vector versus without vector, or because
different hardware has different sets of implemented CSRs.  We don't appear
to have reserved ranges for NT_* values, though we sort of have a scheme
for processor specific values, e.g. 0x1XX for ppc, 0x2XX for x86, 0x3XX for
s390, etc.  OS specific values tend to be low values below 0x100 but above
6, with only FreeBSD starting at 7 and most others starting at 10.  So that
leaves high values like ascii encodings of the NT_* name as safe for new
uses.  There are 3 of these already, this would be a fourth one.

Jim


More information about the Binutils mailing list