This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [binutils patch] DWARF-5: readelf: .debug_names
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sourceware dot org, gdb-patches at sourceware dot org
- Date: Sat, 10 Jun 2017 09:13:49 +0200
- Subject: Re: [binutils patch] DWARF-5: readelf: .debug_names
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jan dot kratochvil at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A9507C0587FF
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A9507C0587FF
- References: <20170526181552.GA15442@host1.jankratochvil.net> <8d6d8339-8fbe-9ac1-5e97-84fcbd264215@redhat.com>
Hi Nick,
On Tue, 06 Jun 2017 15:41:15 +0200, Nick Clifton wrote:
> > binutils/ChangeLog
> > 2017-05-26 Jan Kratochvil <jan.kratochvil@redhat.com>
> >
> > * dwarf.c: Include assert.h.
> > (MAX, MIN, get_IDX_name, display_debug_names): New.
> > (debug_displays): Add .debug_names.
> > * dwarf.h: (enum dwarf_section_display_enum): Add debug_names.
> > * readelf.c (process_section_headers): Add ".debug_names".
>
> Approved - please apply.
thanks for the approval but I cannot check it in yet as it depends on:
[gcc patch] DWARF-5: Define DW_IDX_GNU_static and DW_IDX_GNU_external
https://gcc.gnu.org/ml/gcc-patches/2017-05/msg02074.html
Message-ID: <20170526181408.GA15337@host1.jankratochvil.net>
Which may additionally be changed depending on DW_IDX_* preallocation by DWARF
committee.
> > + printf (_("Version %ld\n"), (long) dwarf_version);
> > + if (dwarf_version != 5)
>
> Shouldn't this test be for >= 5 ?
0..4: Such .debug_names format has never been defined anywhere.
5: The supported version.
6..65535: Their format may/will change, I do not think readelf should attempt
decoding future unknown data format.
It is written similarly as .gdb_index version check is written:
/* Prior versions are obsolete, and future versions may not be
backwards compatible. */
if (version < 3 || version > 8)
{
warn (_("Unsupported version %lu.\n"), (unsigned long) version);
return 0;
}
Jan