[PATCH] D39854: [DWARFv5] Support FORM_strp in .debug_line.dwo

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 13:34:59 PST 2017


probinson added inline comments.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFContext.cpp:344-348
+      auto It = LineToUnit.find(Offset);
+      if (It != LineToUnit.end()) {
+        U = It->second;
+        LineData.setAddressSize(U->getAddressByteSize());
+      }
----------------
dblaikie wrote:
> Would it make sense to sink this down into the LineTable parsing logic, so that the unit isn't looked up when it's not needed? (when using more recent line table formats that have a standalone description (if I'm understanding the DWARF5 line table support correctly))
We need to look up the unit anyway.  The unit is how the LineTable parsing finds the string section, and .debug_str_offsets (for FORM_strx).  And the .debug_addr section, once I get to that.  We could defer setting the data extractor's address size until we're down into LineTable, but we can't defer looking up the unit.


https://reviews.llvm.org/D39854





More information about the llvm-commits mailing list