[Lldb-commits] [lldb] r141866 - in /lldb/trunk: include/lldb/Core/Module.h include/lldb/Expression/ClangExpressionDeclMap.h source/Breakpoint/BreakpointResolverName.cpp source/Core/AddressResolverName.cpp source/Core/Module.cpp source/Core/ModuleList.cpp source/Expression/ClangExpressionDeclMap.cpp source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp

Sean Callanan scallanan at apple.com
Thu Oct 13 09:49:48 PDT 2011


Author: spyffe
Date: Thu Oct 13 11:49:47 2011
New Revision: 141866

URL: http://llvm.org/viewvc/llvm-project?rev=141866&view=rev
Log:
Removed namespace qualification from symbol queries.

Modified:
    lldb/trunk/include/lldb/Core/Module.h
    lldb/trunk/include/lldb/Expression/ClangExpressionDeclMap.h
    lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp
    lldb/trunk/source/Core/AddressResolverName.cpp
    lldb/trunk/source/Core/Module.cpp
    lldb/trunk/source/Core/ModuleList.cpp
    lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
    lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp

Modified: lldb/trunk/include/lldb/Core/Module.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Module.h?rev=141866&r1=141865&r2=141866&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Module.h (original)
+++ lldb/trunk/include/lldb/Core/Module.h Thu Oct 13 11:49:47 2011
@@ -161,7 +161,6 @@
 
     size_t
     FindSymbolsWithNameAndType (const ConstString &name,
-                                const ClangNamespaceDecl *namespace_decl,
                                 lldb::SymbolType symbol_type, 
                                 SymbolContextList &sc_list);
 

Modified: lldb/trunk/include/lldb/Expression/ClangExpressionDeclMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ClangExpressionDeclMap.h?rev=141866&r1=141865&r2=141866&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ClangExpressionDeclMap.h (original)
+++ lldb/trunk/include/lldb/Expression/ClangExpressionDeclMap.h Thu Oct 13 11:49:47 2011
@@ -889,23 +889,15 @@
     /// @param[in] target
     ///     The target to use as the basis for the search.
     ///
-    /// @param[in] module
-    ///     If non-NULL, the module to query.
-    ///
     /// @param[in] name
     ///     The name as a plain C string.
     ///
-    /// @param[in] namespace_decl
-    ///     If valid and module is non-NULL, the parent namespace.
-    ///
     /// @return
     ///     The LLDB Symbol found, or NULL if none was found.
     //---------------------------------------------------------
     Symbol *
     FindGlobalDataSymbol (Target &target,
-                          lldb::ModuleSP &module,
-                          const ConstString &name,
-                          ClangNamespaceDecl *namespace_decl);
+                          const ConstString &name);
     
     //------------------------------------------------------------------
     /// Given a target, find a variable that matches the given name and 

Modified: lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp?rev=141866&r1=141865&r2=141866&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp Thu Oct 13 11:49:47 2011
@@ -140,7 +140,7 @@
                 if (num_functions == 0 && !filter_by_cu)
                 {
                     if (m_func_name_type_mask & (eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeAuto))
-                        context.module_sp->FindSymbolsWithNameAndType (m_func_name, NULL, eSymbolTypeCode, sym_list);
+                        context.module_sp->FindSymbolsWithNameAndType (m_func_name, eSymbolTypeCode, sym_list);
                 }
             }
             break;

Modified: lldb/trunk/source/Core/AddressResolverName.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/AddressResolverName.cpp?rev=141866&r1=141865&r2=141866&view=diff
==============================================================================
--- lldb/trunk/source/Core/AddressResolverName.cpp (original)
+++ lldb/trunk/source/Core/AddressResolverName.cpp Thu Oct 13 11:49:47 2011
@@ -111,7 +111,6 @@
         if (context.module_sp)
         {
             context.module_sp->FindSymbolsWithNameAndType (m_func_name,
-                                                           NULL,
                                                            eSymbolTypeCode, 
                                                            sym_list);
             context.module_sp->FindFunctions (m_func_name,

Modified: lldb/trunk/source/Core/Module.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Module.cpp?rev=141866&r1=141865&r2=141866&view=diff
==============================================================================
--- lldb/trunk/source/Core/Module.cpp (original)
+++ lldb/trunk/source/Core/Module.cpp Thu Oct 13 11:49:47 2011
@@ -687,7 +687,7 @@
 }
 
 size_t
-Module::FindSymbolsWithNameAndType (const ConstString &name, const ClangNamespaceDecl *namespace_decl, SymbolType symbol_type, SymbolContextList &sc_list)
+Module::FindSymbolsWithNameAndType (const ConstString &name, SymbolType symbol_type, SymbolContextList &sc_list)
 {
     // No need to protect this call using m_mutex all other method calls are
     // already thread safe.

Modified: lldb/trunk/source/Core/ModuleList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ModuleList.cpp?rev=141866&r1=141865&r2=141866&view=diff
==============================================================================
--- lldb/trunk/source/Core/ModuleList.cpp (original)
+++ lldb/trunk/source/Core/ModuleList.cpp Thu Oct 13 11:49:47 2011
@@ -254,7 +254,7 @@
     sc_list.Clear();
     collection::iterator pos, end = m_modules.end();
     for (pos = m_modules.begin(); pos != end; ++pos)
-        (*pos)->FindSymbolsWithNameAndType (name, NULL, symbol_type, sc_list);
+        (*pos)->FindSymbolsWithNameAndType (name, symbol_type, sc_list);
     return sc_list.GetSize();
 }
 

Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=141866&r1=141865&r2=141866&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Thu Oct 13 11:49:47 2011
@@ -631,7 +631,7 @@
 )
 {
     if (sym_ctx.module_sp)
-       sym_ctx.module_sp->FindSymbolsWithNameAndType(name, NULL, eSymbolTypeCode, sc_list);
+       sym_ctx.module_sp->FindSymbolsWithNameAndType(name, eSymbolTypeCode, sc_list);
     
     if (!sc_list.GetSize())
         sym_ctx.target_sp->GetImages().FindSymbolsWithNameAndType(name, eSymbolTypeCode, sc_list);
@@ -1950,22 +1950,14 @@
 ClangExpressionDeclMap::FindGlobalDataSymbol
 (
     Target &target,
-    ModuleSP &module,
-    const ConstString &name,
-    ClangNamespaceDecl *namespace_decl
+    const ConstString &name
 )
 {
     SymbolContextList sc_list;
     
-    if (module && namespace_decl)
-        module->FindSymbolsWithNameAndType(name, 
-                                           namespace_decl, 
-                                           eSymbolTypeData, 
-                                           sc_list);
-    else
-        target.GetImages().FindSymbolsWithNameAndType(name, 
-                                                      eSymbolTypeData, 
-                                                      sc_list);
+    target.GetImages().FindSymbolsWithNameAndType(name, 
+                                                  eSymbolTypeData, 
+                                                  sc_list);
     
     if (sc_list.GetSize())
     {
@@ -2408,7 +2400,7 @@
                 // We couldn't find a non-symbol variable for this.  Now we'll hunt for a generic 
                 // data symbol, and -- if it is found -- treat it as a variable.
                 
-                Symbol *data_symbol = FindGlobalDataSymbol(*target, module_sp, name, &namespace_decl);
+                Symbol *data_symbol = FindGlobalDataSymbol(*target, name);
                 
                 if (data_symbol)
                 {

Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=141866&r1=141865&r2=141866&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Thu Oct 13 11:49:47 2011
@@ -1696,7 +1696,7 @@
         
         SymbolContextList contexts;
         SymbolContext context;
-        if (!m_module->FindSymbolsWithNameAndType(ConstString ("start"), NULL, eSymbolTypeCode, contexts))
+        if (!m_module->FindSymbolsWithNameAndType(ConstString ("start"), eSymbolTypeCode, contexts))
             return m_entry_point_address;
         
         contexts.GetContextAtIndex(0, context);





More information about the lldb-commits mailing list