diff options
author | Ewan Crawford <ewan@codeplay.com> | 2015-12-17 11:59:47 +0000 |
---|---|---|
committer | Ewan Crawford <ewan@codeplay.com> | 2015-12-17 11:59:47 +0000 |
commit | 37395ad211e607d6f366cc98c8685aea812de8a7 (patch) | |
tree | 6b4ea32a0f6c30fac17e77b748a2027c9c1e2053 /lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp | |
parent | 23f04fd469d7a05de41bdb66d0bd23d2d0dbca61 (diff) | |
download | bcm5719-llvm-37395ad211e607d6f366cc98c8685aea812de8a7.tar.gz bcm5719-llvm-37395ad211e607d6f366cc98c8685aea812de8a7.zip |
Inspect DW_AT_const_value global static const variables
This patch adds support for printing global static const variables which are given a DW_AT_const_value DWARF tag by clang.
Fix for bug https://llvm.org/bugs/show_bug.cgi?id=25653
Reviewers: clayborg, tberghammer
Subscribers: emaste, lldb-commits
Differential Revision: http://reviews.llvm.org/D15576
llvm-svn: 255887
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp index 421249c33f3..e7cb2b413ad 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp @@ -815,7 +815,7 @@ DWARFCompileUnit::IndexPrivate (DWARFCompileUnit* dwarf_cu, bool is_declaration = false; //bool is_artificial = false; bool has_address = false; - bool has_location = false; + bool has_location_or_const_value = false; bool is_global_or_static_variable = false; DWARFFormValue specification_die_form; @@ -860,7 +860,8 @@ DWARFCompileUnit::IndexPrivate (DWARFCompileUnit* dwarf_cu, break; case DW_AT_location: - has_location = true; + case DW_AT_const_value: + has_location_or_const_value = true; if (tag == DW_TAG_variable) { const DWARFDebugInfoEntry* parent_die = die.GetParent(); @@ -1035,7 +1036,7 @@ DWARFCompileUnit::IndexPrivate (DWARFCompileUnit* dwarf_cu, break; case DW_TAG_variable: - if (name && has_location && is_global_or_static_variable) + if (name && has_location_or_const_value && is_global_or_static_variable) { globals.Insert (ConstString(name), DIERef(cu_offset, die.GetOffset())); // Be sure to include variables by their mangled and demangled |