summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2011-10-13 21:50:33 +0000
committerSean Callanan <scallanan@apple.com>2011-10-13 21:50:33 +0000
commitebe6067a8cf420445cfb50bac9ed1fc699fcc328 (patch)
tree0bf38a46ed6f7e7c62caa9d60fb852e89b5e0ca6 /lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
parent7cdf9486015e6a220d60e999313c12110ee8a12f (diff)
downloadbcm5719-llvm-ebe6067a8cf420445cfb50bac9ed1fc699fcc328.tar.gz
bcm5719-llvm-ebe6067a8cf420445cfb50bac9ed1fc699fcc328.zip
Enabled the namespace-specific search functionality,
which had previously been commented out while I tested it. It's not fully working yet, but it doesn't break our testsuite and it's an important piece of functionality. Also added some logging to SymbolFileDWARF to help diagnose entities that are found in a symbol file, but do not reside in the expected namespace. llvm-svn: 141894
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 94f7b89145b..848becfba8d 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -1982,6 +1982,8 @@ SymbolFileDWARF::DIEIsInNamespace (const ClangNamespaceDecl *namespace_decl,
// No namespace specified, so the answesr i
if (namespace_decl == NULL)
return true;
+
+ LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
const DWARFDebugInfoEntry *decl_ctx_die = GetDeclContextDIEContainingDIE (cu, die);
if (decl_ctx_die)
@@ -1991,12 +1993,21 @@ SymbolFileDWARF::DIEIsInNamespace (const ClangNamespaceDecl *namespace_decl,
if (clang_namespace_decl)
{
if (decl_ctx_die->Tag() != DW_TAG_namespace)
+ {
+ if (log)
+ log->Printf("Found a match, but its parent is not a namespace");
return false;
-
+ }
+
DeclContextToDIEMap::iterator pos = m_decl_ctx_to_die.find(clang_namespace_decl);
if (pos == m_decl_ctx_to_die.end())
+ {
+ if (log)
+ log->Printf("Found a match in a namespace, but its parent is not the requested namespace");
+
return false;
+ }
return decl_ctx_die == pos->second;
}
@@ -2010,6 +2021,10 @@ SymbolFileDWARF::DIEIsInNamespace (const ClangNamespaceDecl *namespace_decl,
return true;
}
}
+
+ if (log)
+ log->Printf("Found a match, but its parent doesn't exist");
+
return false;
}
uint32_t
OpenPOWER on IntegriCloud