diff options
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp index 2784ca575a1..bd4e87d8ac7 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp @@ -883,6 +883,14 @@ DWARFCompileUnit::Index if (name && has_location && is_global_or_static_variable) { globals.Insert (ConstString(name), die_info); + // Be sure to include variables by their mangled and demangled + // names if they have any since a variable can have a basename + // "i", a mangled named "_ZN12_GLOBAL__N_11iE" and a demangled + // mangled name "(anonymous namespace)::i"... + if (mangled.GetMangledName()) + globals.Insert (mangled.GetMangledName(), die_info); + if (mangled.GetDemangledName()) + globals.Insert (mangled.GetDemangledName(), die_info); } break; |