[PATCH] D44211: DWARFVerifier: Basic verification of .debug_names

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 7 08:23:58 PST 2018


labath created this revision.
labath added reviewers: JDevlieghere, aprantl, probinson, dblaikie.

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.

I am not entirely sure I have the different message levels calibrated
correctly here: I flag the case when multiple name indexes reference the
same CU as a warning, but I think that could easily be considered an
error as well. Also, the case of a CU not being covered by any index
could possibly be upgrated to a warning as well.


Repository:
  rL LLVM

https://reviews.llvm.org/D44211

Files:
  include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
  include/llvm/DebugInfo/DWARF/DWARFVerifier.h
  lib/DebugInfo/DWARF/DWARFVerifier.cpp
  test/tools/llvm-dwarfdump/X86/debug-names-verify-abbrev-duplicate.s
  test/tools/llvm-dwarfdump/X86/debug-names-verify-abbrev-short.s
  test/tools/llvm-dwarfdump/X86/debug-names-verify-buckets.s
  test/tools/llvm-dwarfdump/X86/debug-names-verify-cu-lists.s
  test/tools/llvm-dwarfdump/X86/debug-names-verify-short1.s
  test/tools/llvm-dwarfdump/X86/debug-names-verify-short2.s
  test/tools/llvm-dwarfdump/X86/debug-names-verify-short3.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44211.137398.patch
Type: text/x-patch
Size: 27967 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180307/3b6ac01c/attachment.bin>


More information about the llvm-commits mailing list