DWARFVerifier: Basic verification of .debug_names
authorPavel Labath <labath@google.com>
Thu, 8 Mar 2018 15:34:42 +0000 (15:34 +0000)
committerPavel Labath <labath@google.com>
Thu, 8 Mar 2018 15:34:42 +0000 (15:34 +0000)
commitb136c3934e1ec2d5c955ceedaa9c178fd6f80bf5
tree9c453668d194983f4a3063355b23bbdd1b7611f3
parent7bbac07f22b82aa8b580624996e11489c4083a8c
DWARFVerifier: Basic verification of .debug_names

Summary:
This patch adds basic .debug_names verification capabilities to the
DWARF verifier. Right now, it checks that the headers and abbreviation
tables of the individual name indexes can be parsed correctly, it
verifies the buckets table and the cross-checks the CU lists for
consistency. I intend to add further checks in follow-up patches.

Reviewers: JDevlieghere, aprantl, probinson, dblaikie

Subscribers: vleschuk, echristo, clayborg, llvm-commits

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

llvm-svn: 327011
llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h
llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
llvm/test/tools/llvm-dwarfdump/X86/debug-names-verify-abbrev-duplicate.s [new file with mode: 0644]
llvm/test/tools/llvm-dwarfdump/X86/debug-names-verify-abbrev-short.s [new file with mode: 0644]
llvm/test/tools/llvm-dwarfdump/X86/debug-names-verify-buckets.s [new file with mode: 0644]
llvm/test/tools/llvm-dwarfdump/X86/debug-names-verify-cu-lists.s [new file with mode: 0644]
llvm/test/tools/llvm-dwarfdump/X86/debug-names-verify-short1.s [new file with mode: 0644]
llvm/test/tools/llvm-dwarfdump/X86/debug-names-verify-short2.s [new file with mode: 0644]
llvm/test/tools/llvm-dwarfdump/X86/debug-names-verify-short3.s [new file with mode: 0644]