https://sourceware.org/bugzilla/show_bug.cgi?id=30948

--- Comment #3 from Mark Wielaard <mark at klomp dot org> ---
See also https://sourceware.org/bugzilla/show_bug.cgi?id=22288

The issue is that we rely on .debug_aranges to know whether a (code) address is
described in a particular DWARF CU (and from there which line table to use). We
could create an aranges table ourselves, that means scanning over all the
Compile Units and look at the first CU DIE, which will have a low-pc and
high-pc (or ranges) attribute describing the addresses. The tricky bit is
"merging" that with any existing .debug_aranges table. And that even if there
is a .debug_aranges it might not be complete.

So I think what we need to do is whenever we try to match up an address to a
CU, we first check the .debug_aranges, if it doesn't match (and it is the first
time) we do a full scan over all CUs and create or auxilary aranges table, then
use that for (any future) mapping. I think this needs to be done in
dwarf_addrdie which uses dwarf_getaranges but we might have to look at other
places which use dwarf_getaranges and decide whether to make that functions the
"magic" one or if that will always report the actual .debug_aranges. I think I
would prefer if dwarf_getaranges would remain reporting the actual
.debug_aranges data (if it is there).

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

Reply via email to