[Bug tools/22288] eu-addr2line doesn't find a rust file:line

mark at klomp dot org sourceware-bugzilla@sourceware.org
Thu Oct 12 20:36:00 GMT 2017


Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
                 CC|                            |mark at klomp dot org

--- Comment #1 from Mark Wielaard <mark at klomp dot org> ---
The problem is that there are no .debug_aranges. eu-addr2line uses that to know
which CU it needs to inspect to find the subprogram in.

Without .debug_aranges we would have to scan all CUs to create our own aranges
table by inspecting the DW_AT_low_pc/DW_AT_high_pc or DW_AT_ranges attributes.

In theory we could do that, but it is not immediately obvious when we should.
If there is no .debug_aranges at all then it might be sensible to assume this
does not mean there are really no CUs that cover program scope addresses. But
if there are .debug_aranges then it seems bad to assume they are wrong or

Best would be to fix rustc to generate .debug_aranges.

Second best would be to have a mechanism to for scanning all CUs and (re)create
the same cache that dwarf_getaranges() would create from the .debug_aranges
section for the CU. One question is if this isn't the default how it interacts
with other users of the aranges cache like dwarf_addrdie, dwfl_module_addrdie
and dwfl_module_getsrc. The last one is what eu-addr2line (and eu-stack) use.

You are receiving this mail because:
You are on the CC list for the bug.

More information about the Elfutils-devel mailing list