[PATCH] D37214: Another prototype fix for lld DWARF parsing of base address selection entries in range lists

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 1 03:29:58 PDT 2017


So it has ranges but also unrelocated zero base address is emited in debug info. Since it has no
corresponding relocation (`SectionIndex` == -1ULL), I am ignoring it to prevent using
-1ULL as section index name.
> Why would this need to be avoided?

If I would not skip such zero base address, then I would unable to print section names for ranges.
Because ranges which also has relocations pointed on would take SectionIndex from
base address instead.

Ah, I think can change logic of getAbsoluteRanges so that ranges will use own section index at first
and will try to use section index of base address only if have no own index.
That looks more correct.

> Shouldn't that be the default value when no base address is specified and its run on a fully relocated object? (no section index in either the base address nor in the > actual addresses in the range list)

For executable yes, SectionIndex == -1ULL be default value and range dumper will just skip
printing section names (since we have no relocations and it is unknown, https://github.com/llvm-mirror/llvm/blob/master/lib/DebugInfo/DWARF/DWARFDie.cpp#L73),
And this new code works fine for executables with base address, because it is relocated and non-zero in that case.
I'll add thestcase.

George.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170901/e6a8dbbb/attachment.html>


More information about the llvm-commits mailing list