[llvm-dev] Collecting address ranges in DWARFUnit::collectAddressRanges.

George Rimar via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 15 07:53:08 PST 2017


?Hi !


I have a question about code used for collecting ranges. I was trying to fix PR35199.

Its issue that it calls unreachable when calls DWARFObject::getFileName().

We do not implement this method in LLD and it fails.

Issue appears when we start to provide .debug_str

section to DWARF parser. And it is relative to following code (lines 335-339):


https://github.com/llvm-mirror/llvm/blob/master/lib/DebugInfo/DWARF/DWARFUnit.cpp#L335


Object I used for debugging parser is following:

t.ii:
int a;

clang++ -gsplit-dwarf -c t.ii -o t.o


When parser tries to read this object it attemps to extract address ranges from dwo.

When we don't give it .debug_str it fails to extract dwo name, exits early and "works" fine, but with

.debug_str provided it tries to take ranges from there, tries to get DWO name to open it and fails.


Though I did not find why it tries to scan .dwo. I tried to comment these lines (335-339) and no tests

were failing for me, at least I tried running tests from \llvm\test\DebugInfo and

running DebugInfoDWARFTests. It seems to me these lines are either untested or useless (?).


So my question is probably next: what is the case when we need to scan .dwo for extracting ranges,

should not address data be accessible from main object always ?

I wonder if these lines really do useful job ??

Best regards,
George | Developer | Access Softek, Inc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171115/511c887a/attachment.html>


More information about the llvm-dev mailing list