This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

dwarflint .debug_aranges


Two things occur to me wrt .debug_aranges validation:

It's not an automatic error if there is no .debug_aranges section (or a
completely empty one).  It's a high-level check that the aranges match the
CUs--but you can legitimately have just CUs that don't have any addresses.

You do a connectivity check for the CU pointers.  It would also be useful
to do a "suspicious" check that there aren't multiple separate sets
pointing to the same CU.  It is not clearly invalid per se to have
multiples, but it is clearly weird.  Our high-level checks probably won't
try to account for multiple sets for a CU being correct.

Also, now that I look at your aranges code, I assume you either haven't
tested it yet or haven't pushed the current code.  The "Covered length"
parsing is totally bogus.  What follows the CU offset are two single bytes
(address_size, segment_size), not another offset-size value that's a
length.  What you should check there is that the address_size matches the
address_size in the CU header, and that the segment_size is 0.


Thanks,
Roland

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]