summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-06-07 10:56:16 +0000
committerPavel Labath <labath@google.com>2018-06-07 10:56:16 +0000
commit6675e652a35c9a28160dfe8577d3d88ca8ed4686 (patch)
treee8e090a4b56dbf04c50260b13faa7a01e727fd7b /lldb/source/Plugins/SymbolFile
parent452bd87cc478f4d017c5c11bb409287335f40f30 (diff)
downloadbcm5719-llvm-6675e652a35c9a28160dfe8577d3d88ca8ed4686.tar.gz
bcm5719-llvm-6675e652a35c9a28160dfe8577d3d88ca8ed4686.zip
DebugNamesDWARFIndex: add namespace lookup support
llvm-svn: 334186
Diffstat (limited to 'lldb/source/Plugins/SymbolFile')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp10
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.h2
2 files changed, 11 insertions, 1 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
index c35dfa9f13a..5f20bc1ce8e 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
@@ -98,6 +98,16 @@ void DebugNamesDWARFIndex::GetGlobalVariables(const RegularExpression &regex,
}
}
+void DebugNamesDWARFIndex::GetNamespaces(ConstString name, DIEArray &offsets) {
+ m_fallback.GetNamespaces(name, offsets);
+
+ for (const DebugNames::Entry &entry :
+ m_debug_names_up->equal_range(name.GetStringRef())) {
+ if (entry.tag() == DW_TAG_namespace)
+ Append(entry, offsets);
+ }
+}
+
void DebugNamesDWARFIndex::Dump(Stream &s) {
m_fallback.Dump(s);
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.h b/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.h
index ed82d74644b..bace53198c6 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.h
@@ -34,7 +34,7 @@ public:
DIEArray &offsets) override {}
void GetTypes(ConstString name, DIEArray &offsets) override {}
void GetTypes(const DWARFDeclContext &context, DIEArray &offsets) override {}
- void GetNamespaces(ConstString name, DIEArray &offsets) override {}
+ void GetNamespaces(ConstString name, DIEArray &offsets) override;
void GetFunctions(ConstString name, DWARFDebugInfo &info,
const CompilerDeclContext &parent_decl_ctx,
uint32_t name_type_mask,
OpenPOWER on IntegriCloud