llvm-project/llvm/lib/DebugInfo/DWARF
Pavel Labath c9f07b06a1 DWARFVerifier: validate information in name index entries
Summary:
This patch add checks to verify that the information in the name index
entries is consistent with the debug_info section. Specifically, we
check that entries point to valid DIEs, and their names, tags, and
compile units match the information in the debug_info sections.

These checks are only run if the previous checks did not find any errors
in the name index headers. Attempting to proceed with the checks anyway
would likely produce a lot of spurious errors and the verification code
would need to be very careful to avoid crashing.

I also add a couple of more checks to the abbreviation-validation code
to verify that some attributes are always present (an index without a
DW_IDX_die_offset attribute is fairly useless).

The entry verification works only on indexes without any type units - I
haven't attempted to extend it to type units, as we don't even have a
DWARF v5-compatible type unit generator at the moment.

Reviewers: JDevlieghere, aprantl, dblaikie

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D45323

llvm-svn: 329392
2018-04-06 13:34:12 +00:00
..
CMakeLists.txt [Support] Move syntax highlighting into support 2018-03-09 09:56:24 +00:00
DWARFAbbreviationDeclaration.cpp [dwarf] Unify unknown dwarf enum formatting code 2018-03-21 11:46:37 +00:00
DWARFAcceleratorTable.cpp DWARFVerifier: validate information in name index entries 2018-04-06 13:34:12 +00:00
DWARFAddressRange.cpp [DWARF v5] Support for verbose dumping of .debug_rnglist entries 2018-03-08 20:52:35 +00:00
DWARFCompileUnit.cpp llvm-dwarfdump: implement --recurse-depth=<N> 2017-09-20 17:44:00 +00:00
DWARFContext.cpp [debug_loc] Fix typo in DWARFExpression constructor 2018-04-06 08:49:57 +00:00
DWARFDataExtractor.cpp Reland "[DebugInfo] Support DWARF expressions in eh_frame" 2018-03-08 00:46:53 +00:00
DWARFDebugAbbrev.cpp dwarfdump: Delay parsing abbreviations until they're needed 2017-09-19 15:13:55 +00:00
DWARFDebugArangeSet.cpp [DebugInfo] Unify dumping of address ranges 2018-01-16 11:17:57 +00:00
DWARFDebugAranges.cpp [DebugInfo] Change std::sort to llvm::sort in response to r327219 2018-04-01 16:18:49 +00:00
DWARFDebugFrame.cpp Reland "[DebugInfo] Support DWARF expressions in eh_frame" 2018-03-08 00:46:53 +00:00
DWARFDebugInfoEntry.cpp [DWARF] NFC: DWARFDataExtractor combines relocs with DataExtractor. 2017-06-29 16:52:08 +00:00
DWARFDebugLine.cpp [DebugInfo] Change std::sort to llvm::sort in response to r327219 2018-04-01 16:18:49 +00:00
DWARFDebugLoc.cpp [debug_loc] Fix typo in DWARFExpression constructor 2018-04-06 08:49:57 +00:00
DWARFDebugMacro.cpp [Support] Move syntax highlighting into support 2018-03-09 09:56:24 +00:00
DWARFDebugPubTable.cpp llvm-dwarfdump: Factor out the printing of the section header (NFC) 2017-09-15 17:39:50 +00:00
DWARFDebugRangeList.cpp [DWARF v5] Add limited support for dumping .debug_rnglists 2018-02-02 12:35:52 +00:00
DWARFDebugRnglists.cpp [DWARF v5][NFC]: Refactor DebugRnglists to prepare for the support of the DW_AT_ranges 2018-04-05 21:01:49 +00:00
DWARFDie.cpp [dwarf] Unify unknown dwarf enum formatting code 2018-03-21 11:46:37 +00:00
DWARFExpression.cpp Reland "[DebugInfo] Support DWARF expressions in eh_frame" 2018-03-08 00:46:53 +00:00
DWARFFormValue.cpp DWARF: Unify form size handling code 2018-03-14 09:39:54 +00:00
DWARFGdbIndex.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
DWARFTypeUnit.cpp Handle abbr_offset with relocations. 2018-03-21 21:31:25 +00:00
DWARFUnit.cpp Handle abbr_offset with relocations. 2018-03-21 21:31:25 +00:00
DWARFUnitIndex.cpp dwarfdump/symbolizer: Avoid loading unneeded CUs from a DWP 2017-09-19 18:36:11 +00:00
DWARFVerifier.cpp DWARFVerifier: validate information in name index entries 2018-04-06 13:34:12 +00:00
LLVMBuild.txt [dwarfdump] Pretty print location expressions and location lists 2017-08-29 21:41:21 +00:00