]> granicus.if.org Git - llvm/commit
[llvm-dwarfdump] - Teach verifier to report broken DWARF expressions.
authorGeorge Rimar <grimar@accesssoftek.com>
Fri, 27 Oct 2017 10:42:04 +0000 (10:42 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Fri, 27 Oct 2017 10:42:04 +0000 (10:42 +0000)
commit603d7b305534c6a358836deff41d6beeb7f1a65d
treee9b991090bb788f83ebb71c7ead3259d0f82c607
parentaa108d865d3062361edbe9c662af43accd8456d8
[llvm-dwarfdump] - Teach verifier to report broken DWARF expressions.

Patch improves next things:

* Fixes assert/crash in getOpDesc when giving it a invalid expression op code.
* DWARFExpression::print() called DWARFExpression::Operation::getEndOffset() which
  returned and used uninitialized field EndOffset. Patch fixes that.
* Teaches verifier to verify DW_AT_location and error out on broken expressions.

Differential revision: https://reviews.llvm.org/D39294

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316756 91177308-0d34-0410-b5e6-96231b3b80d8
lib/DebugInfo/DWARF/DWARFExpression.cpp
lib/DebugInfo/DWARF/DWARFVerifier.cpp
test/tools/llvm-dwarfdump/X86/verify_broken_exprloc.s [new file with mode: 0644]