This patch adds two new verifications:
- Check that the root DIE of a CU is actually a valid unit DIE. (based on its tag)
- For DWARF5 which contains a unit type int he CU header, check that this matches the type of the unit DIE.
Paths
| Differential D38453
[dwarfdump] Verify that unit type matches root DIE ClosedPublic Authored by JDevlieghere on Oct 2 2017, 4:40 AM.
Details Summary This patch adds two new verifications:
Diff Detail
Event TimelineJDevlieghere added inline comments.
This revision is now accepted and ready to land.Oct 6 2017, 10:51 AM
JDevlieghere added inline comments.
Closed by commit rL315121: [dwarfdump] Verify that unit type matches root DIE (authored by JDevlieghere). · Explain WhyOct 6 2017, 3:29 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 118096 llvm/trunk/include/llvm/BinaryFormat/Dwarf.h
llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFUnit.h
llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFVerifier.h
llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp
llvm/trunk/test/DebugInfo/dwarfdump-header.test
llvm/trunk/test/tools/llvm-dwarfdump/X86/empty-CU.s
llvm/trunk/test/tools/llvm-dwarfdump/X86/verify_debug_info.s
llvm/trunk/test/tools/llvm-dwarfdump/X86/verify_unit_header_chain.s
|
This is probably incorrect - imported_units seem to be used to import a unit into another unit, they aren't themselves a valid top-level unit. (See Figure E.6 in DWARF5 for an example of their use)