[Lldb-commits] [lldb] r276735 - Fix incorrect form test in SymbolFileDWARF
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 26 01:16:19 PDT 2016
Author: labath
Date: Tue Jul 26 03:16:19 2016
New Revision: 276735
URL: http://llvm.org/viewvc/llvm-project?rev=276735&view=rev
Log:
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
Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp?rev=276735&r1=276734&r2=276735&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp Tue Jul 26 03:16:19 2016
@@ -556,6 +556,7 @@ DWARFFormValue::IsBlockForm(const dw_for
{
switch (form)
{
+ case DW_FORM_exprloc:
case DW_FORM_block:
case DW_FORM_block1:
case DW_FORM_block2:
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=276735&r1=276734&r2=276735&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Tue Jul 26 03:16:19 2016
@@ -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();
More information about the lldb-commits
mailing list