[PATCH] D37123: [dwarfdump] Pretty print location expressions and location lists

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 28 13:01:00 PDT 2017


rnk added inline comments.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFContext.cpp:248-251
+    // The compile unit is wrong, but the same dirty trick is used in
+    // getDebugLoc().
+    if (getNumCompileUnits())
+      getDebugLoc()->dump(OS, getCompileUnitAtIndex(0));
----------------
When I tried factoring out the base address patch, I ran into this comment. How would we do this correctly? What scenario would cause us to pick the wrong compile unit? Picking the wrong compile unit would add the wrong base address to the .debug_loc entries.


https://reviews.llvm.org/D37123





More information about the llvm-commits mailing list