This is the mail archive of the
mailing list for the elfutils project.
Re: readelf: Displaying "raw" .debug_aranges
- From: Roland McGrath <roland at hack dot frob dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Fri, 22 Mar 2013 13:55:58 -0700
- Subject: Re: readelf: Displaying "raw" .debug_aranges
> I am undecided whether to "fix" the dwarf_getaranges code to do the same
> (in normal cases the length and terminator for the table match up, so it
> shouldn't matter).
I'm not really clear on what change you are considering.
Looking at the (v4) spec there is no real indication why it has both
length and terminator. The length in the header is the form common to
all the sections, which has the feature that you can decode just the
header to skip to the next set without decoding this one. A consumer
that wanted to be lazy could process only the sets for particular CUs
of interest. But I can't really see a reason why any consumer would
want to examine .debug_aranges at all when it already had particular
CUs in mind. Regardless, I don't see anything in the spec that would
suggest it's permissible for there to be any bytes after a terminator
entry in the range indicated by the length field.