This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [patch] Add printing of .gdb_index section to readelf
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Mon, 18 Apr 2011 19:07:22 +0200
- Subject: Re: [patch] Add printing of .gdb_index section to readelf
On Mon, 2011-04-18 at 09:43 -0600, Tom Tromey wrote:
> It might mean that this CU covers no addresses -- and this would be very
> convenient, since it would mean that .debug_aranges is a reliable index
> in the sense of being both complete and correct.
>
> But, because .debug_aranges is optional in DWARF, I think this cannot be
> distinguished from a bad tool or bad user action. That is, maybe the
> user stripped this section from his .o. Or maybe he used some compiler
> which does not emit .debug_aranges.
Note that libdw relies on .debug_aranges. For example dwarf_addrdie (),
which returns the CU DIE containing a given address, just returns NULL
if the aranges section isn't there.
Cheers,
Mark