[PATCH] D32625: lldb-dwarfdump -verify [-quiet]
Greg Clayton via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 27 16:25:20 PDT 2017
clayborg created this revision.
This patch add the framework for verifying DWARF using llvm-dwarfdump as the front end.
This patch currently verifies:
- All DW_TAG_subprogram DIEs ranges have any child ranges (DW_AT_lexical_block and DW_AT_inlined_subroutine) verified to ensure that all ranges are in the parent ranges.
- Make sure that no DW_TAG_subprogram address ranges overlap
- If a DW_TAG_compile_unit has DW_AT_ranges, then ensure that all DW_TAG_subprogram ranges are in the CU ranges.
- All DW_AT_ranges attributes have valid .debug_ranges offsets
- All DW_AT_stmt_list attributes have valid .debug_line offsets
- All DW_FORM_strp attributes have valid .debug_str offsets
- All reference attributes (DW_FORM_ref1,DW_FORM_ref2, DW_FORM_ref4, DW_FORM_ref8, DW_FORM_ref_udata, DW_FORM_ref_addr) have values that point to actual valid DIE offsets.
- If .debug_aranges is available, we parse only the information in there and verify that all function ranges are accounted for and point to the correct CU offset
- Verifies all line table rows have valid increasing addresses within each sequence
- Verifies all line table rows have valid file indexes
https://reviews.llvm.org/D32625
Files:
include/llvm/DebugInfo/DIContext.h
include/llvm/DebugInfo/DWARF/DWARFContext.h
include/llvm/DebugInfo/DWARF/DWARFDebugAranges.h
include/llvm/DebugInfo/DWARF/DWARFDebugLine.h
lib/DebugInfo/DWARF/DWARFContext.cpp
lib/DebugInfo/DWARF/DWARFDebugAranges.cpp
lib/DebugInfo/DWARF/DWARFDebugLine.cpp
lib/DebugInfo/DWARF/DWARFFormValue.cpp
tools/llvm-dwarfdump/llvm-dwarfdump.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32625.97017.patch
Type: text/x-patch
Size: 25479 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170427/e89e4f9b/attachment-0001.bin>
More information about the llvm-commits
mailing list