diff options
| author | Pavel Labath <labath@google.com> | 2016-07-26 08:16:19 +0000 |
|---|---|---|
| committer | Pavel Labath <labath@google.com> | 2016-07-26 08:16:19 +0000 |
| commit | 57d053511fbd1f2dd30f6d5cc729846f0e0aa3e3 (patch) | |
| tree | 334be072cc71aff716160185a153758fa3701b56 | |
| parent | f7e7fdd5cfebf4a8a30e4b4dce410a237f13a17c (diff) | |
| download | bcm5719-llvm-57d053511fbd1f2dd30f6d5cc729846f0e0aa3e3.tar.gz bcm5719-llvm-57d053511fbd1f2dd30f6d5cc729846f0e0aa3e3.zip | |
Fix incorrect form test in SymbolFileDWARF
Summary:
We were checking whether an attribute is in block form by getting the block data pointer, which
was not correct as the pointer be null even if the attribute is in block form. Other places in
the file already use the correct test.
To make this work, I've needed to add DW_FORM_exprlock to the list of "block" forms, which seems
correct as that is how we are parsing it.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D22756
llvm-svn: 276735
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp | 1 | ||||
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp index addc1485846..f8d137f713f 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp @@ -556,6 +556,7 @@ DWARFFormValue::IsBlockForm(const dw_form_t form) { switch (form) { + case DW_FORM_exprloc: case DW_FORM_block: case DW_FORM_block1: case DW_FORM_block2: diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 4591c0af012..bf27ccba427 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -4292,7 +4292,7 @@ SymbolFileDWARF::ParseVariableDIE { location_is_const_value_data = false; has_explicit_location = true; - if (form_value.BlockData()) + if (DWARFFormValue::IsBlockForm(form_value.Form())) { const DWARFDataExtractor& debug_info_data = get_debug_info_data(); |

