[PATCH] D53155: [DWARF] Make llvm-dwarfdump display location lists in a .dwp file correctly. Fixes PR38990.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 11 11:27:54 PDT 2018


dblaikie added inline comments.


================
Comment at: lib/DebugInfo/DWARF/DWARFDie.cpp:117-120
+      if (auto *IndexEntry = U->getIndexEntry())
+        if (const auto *C = IndexEntry->getOffset(DW_SECT_LOC))
+          Offset += C->Offset;
+      DataExtractor Data(LocSection->Data, Ctx.isLittleEndian(), 0);
----------------
Any chance this could be done when the unit is constructed, rather than every time a loc list is dumped? (ie: could the unit either be constructed with a StringRef of the LocSection already offset to the index entry - or have the unit constructor take the whole LocSection, examine its index entry, and then store the sub-section adjusted/computed using the index entry)


================
Comment at: lib/DebugInfo/DWARF/DWARFUnit.cpp:447
         // Adjust RangeSectionBase to point past the table header.
-        if (isDWO && RngListTable)
+        if (IsDWO && RngListTable)
           RangeSectionBase = RngListTable->getHeaderSize();
----------------
Could be worth doing this isDWO->IsDWO rename separately, easy to commit & simplify this change a bit.


https://reviews.llvm.org/D53155





More information about the llvm-commits mailing list