[PATCH] D32821: Add DWARF verifiers to verify address ranges are correct and scoped correctly.

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 8 15:42:53 PDT 2017


clayborg marked 5 inline comments as done.
clayborg added inline comments.


================
Comment at: lib/DebugInfo/DWARF/DWARFVerifier.cpp:71
+    Prev = Curr;
+  }
+}
----------------
These are sorted ranges since the data is in a std::set. You can't have 1 overlap with 3 without 1 and 2 overlapping and 2 and 3 overlapping.


================
Comment at: lib/DebugInfo/DWARF/DWARFVerifier.cpp:163
+      ParentVRI.RI.Die.dump(OS, 0);
+      Die.dump(OS, 0);
+    }
----------------
That is exactly what ParentVRI is? The class DieRangeInfo maintains this info. I didn't use one for the CU, but I use it for everything else. What am I missing here?


================
Comment at: lib/DebugInfo/DWARF/DWARFVerifier.cpp:180
+  if (!VRI.ChildRangesCantOverlap.empty())
+    verifyNoRangesOverlap(VRI.ChildRangesCantOverlap);
+}
----------------
We now check for overlapping functions on the fly and overlapping lexical blocks and inlined subroutines on the fly.


================
Comment at: lib/DebugInfo/DWARF/DWARFVerifier.cpp:295
 
-void DWARFVerifier::veifyDebugInfoReferences() {
+void DWARFVerifier::verifyDebugInfoReferences() {
   // Take all references and make sure they point to an actual DIE by
----------------
dblaikie wrote:
> Similarly, commit without pre-commit review spelling corrections like this - makes it easier to review the real changes without having them conflated with cleanup changes like this.
Sure thing.


================
Comment at: lib/DebugInfo/DWARF/DWARFVerifier.cpp:320
+  OS << "Verifying .debug_info function address ranges for overlap...\n";
+  verifyNoRangesOverlap(AllFunctionDieRangeInfos);
+}
----------------
It has now been inlined.


https://reviews.llvm.org/D32821





More information about the llvm-commits mailing list