[Dwarf-Discuss] Interaction between aranges and unit proposals
tromey at redhat.com
Wed Apr 23 08:01:59 PDT 2014
Mark> To make it possible to quickly see whether an address (range) is covered
Mark> by an ELF file containing DWARF information two proposals were made:
I finally read through this thread.
Cary> I think it's fine for a consumer to first assume that the
Cary> .debug_aranges table is complete, but if an address lookup fails, then
Cary> it can scan the .debug_info section, hopping from one CU/TU to the
Cary> next, looking for CUs that aren't covered by .debug_aranges tables.
Cary> Having the debug_info length field in the aranges table would help,
Cary> but even then, it's not clear to me how much it will help.
The idea was to avoid having to scan all the CUs just because a bad
address was given.
However, the completeness property is probably more important for
by-name indices, where you don't want a single typo to destroy whatever
performance gain you get from an index.
For addresses maybe someone can make gdb also use the ld.so map to
figure out where an address ought to be searched for. I don't believe
this is done currently, though I am not certain.
That said, on the whole I think it's probably fine to drop this
proposal. While this remains a bit of a hole in DWARF, in practice we
run dwz on everything in the distro and it can fix up issues like this.
More information about the Dwarf-Discuss