From 947ccc73965cb1102bcab932f55c56729d02cf03 Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Thu, 1 Dec 2011 02:04:16 +0000 Subject: Made symbol lookup in the expression parser more robust: - Now a client can specify what kind of symbols are needed; notably, this allows looking up Objective-C class symbols specifically. - In the class of symbols being looked up, if one is non-NULL and others are NULL, LLDB now prefers the non-NULL one. llvm-svn: 145554 --- lldb/source/Expression/ClangExpressionDeclMap.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lldb/source/Expression/ClangExpressionDeclMap.cpp') diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp index 6da3e44fe94..88eeba83182 100644 --- a/lldb/source/Expression/ClangExpressionDeclMap.cpp +++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp @@ -718,16 +718,16 @@ ClangExpressionDeclMap::GetFunctionAddress } addr_t -ClangExpressionDeclMap::GetSymbolAddress (Target &target, const ConstString &name) +ClangExpressionDeclMap::GetSymbolAddress (Target &target, const ConstString &name, lldb::SymbolType symbol_type) { SymbolContextList sc_list; - target.GetImages().FindSymbolsWithNameAndType(name, eSymbolTypeAny, sc_list); + target.GetImages().FindSymbolsWithNameAndType(name, symbol_type, sc_list); const uint32_t num_matches = sc_list.GetSize(); addr_t symbol_load_addr = LLDB_INVALID_ADDRESS; - for (uint32_t i=0; im_exe_ctx->GetTargetPtr()) return false; - return GetSymbolAddress(m_parser_vars->m_exe_ctx->GetTargetRef(), name); + return GetSymbolAddress(m_parser_vars->m_exe_ctx->GetTargetRef(), name, symbol_type); } // Interface for IRInterpreter @@ -1741,7 +1741,7 @@ ClangExpressionDeclMap::DoMaterializeOneVariable } else if (sym) { - addr_t location_load_addr = GetSymbolAddress(*target, name); + addr_t location_load_addr = GetSymbolAddress(*target, name, lldb::eSymbolTypeAny); if (location_load_addr == LLDB_INVALID_ADDRESS) { -- cgit v1.2.3