[PATCH] D69462: [DebugInfo]: Support for debug_loclists.dwo section in llvm and llvm-dwarfdump.
Pavel Labath via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 19 04:51:31 PST 2019
labath added a comment.
I've only looked at the consumption side, and it seems reasonable to me. The main thing I noticed is that it would be good to abstract the logic for computing the actual final offset in the loclists table somehow (I'm talking about the code that's presently in `DWARFDie.cpp:dumpLocation`). That's because the this logic will need to be repeated in the code which fetches the final resolved addresses programmatically (DWARFDie::getLocations in D70394 <https://reviews.llvm.org/D70394>). It also probably means that the code in that patch does not handle all of these cases correctly.
However, currently I don't know what's the best way to do that (and I don't even think it's you who needs to make that happen). Though, if you have any thoughts on this, I'd like to hear them.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp:190-199
+ ? std::make_unique<DWARFDebugLoclists>(
+ DWARFDataExtractor(
+ Context.getDWARFObj(),
+ Context.getDWARFObj().getLoclistsDWOSection(),
+ isLittleEndian, getAddressByteSize()),
+ Header.getVersion())
+ : std::make_unique<DWARFDebugLoclists>(
----------------
I'd probably factor this so that just the DWARFDataExtractor is created in the conditional, and the creation of the loclists object is a separate statement.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69462/new/
https://reviews.llvm.org/D69462
More information about the llvm-commits
mailing list