[Lldb-commits] [lldb] r150279 - in /lldb/trunk: include/lldb/Core/ include/lldb/Symbol/ source/API/ source/Breakpoint/ source/Commands/ source/Core/ source/Expression/ source/Plugins/Process/Utility/ source/Plugins/SymbolFile/DWARF/ source/Plugins/SymbolFile/Symtab/ source/Symbol/

Sean Callanan scallanan at apple.com
Fri Feb 10 14:52:19 PST 2012


Author: spyffe
Date: Fri Feb 10 16:52:19 2012
New Revision: 150279

URL: http://llvm.org/viewvc/llvm-project?rev=150279&view=rev
Log:
Extended function lookup to allow the user to
indicate whether inline functions are desired.
This allows the expression parser, for instance,
to filter out inlined functions when looking for
functions it can call.

Modified:
    lldb/trunk/include/lldb/Core/Module.h
    lldb/trunk/include/lldb/Core/ModuleList.h
    lldb/trunk/include/lldb/Symbol/SymbolFile.h
    lldb/trunk/include/lldb/Symbol/SymbolVendor.h
    lldb/trunk/source/API/SBModule.cpp
    lldb/trunk/source/API/SBTarget.cpp
    lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp
    lldb/trunk/source/Commands/CommandCompletions.cpp
    lldb/trunk/source/Commands/CommandObjectSource.cpp
    lldb/trunk/source/Commands/CommandObjectTarget.cpp
    lldb/trunk/source/Core/AddressResolverName.cpp
    lldb/trunk/source/Core/Disassembler.cpp
    lldb/trunk/source/Core/Module.cpp
    lldb/trunk/source/Core/ModuleList.cpp
    lldb/trunk/source/Core/SourceManager.cpp
    lldb/trunk/source/Expression/ClangASTSource.cpp
    lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
    lldb/trunk/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
    lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
    lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
    lldb/trunk/source/Symbol/SymbolVendor.cpp

Modified: lldb/trunk/include/lldb/Core/Module.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Module.h?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Module.h (original)
+++ lldb/trunk/include/lldb/Core/Module.h Fri Feb 10 16:52:19 2012
@@ -271,7 +271,8 @@
     FindFunctions (const ConstString &name,
                    const ClangNamespaceDecl *namespace_decl,
                    uint32_t name_type_mask, 
-                   bool symbols_ok, 
+                   bool symbols_ok,
+                   bool inlines_ok,
                    bool append, 
                    SymbolContextList& sc_list);
 
@@ -300,6 +301,7 @@
     uint32_t
     FindFunctions (const RegularExpression& regex, 
                    bool symbols_ok, 
+                   bool inlines_ok,
                    bool append, 
                    SymbolContextList& sc_list);
 

Modified: lldb/trunk/include/lldb/Core/ModuleList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ModuleList.h?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ModuleList.h (original)
+++ lldb/trunk/include/lldb/Core/ModuleList.h Fri Feb 10 16:52:19 2012
@@ -182,6 +182,7 @@
     FindFunctions (const ConstString &name,
                    uint32_t name_type_mask,
                    bool include_symbols,
+                   bool include_inlines,
                    bool append,
                    SymbolContextList &sc_list);
 

Modified: lldb/trunk/include/lldb/Symbol/SymbolFile.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolFile.h?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/SymbolFile.h (original)
+++ lldb/trunk/include/lldb/Symbol/SymbolFile.h Fri Feb 10 16:52:19 2012
@@ -133,8 +133,8 @@
     virtual uint32_t        ResolveSymbolContext (const FileSpec& file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, SymbolContextList& sc_list) = 0;
     virtual uint32_t        FindGlobalVariables (const ConstString &name, const ClangNamespaceDecl *namespace_decl, bool append, uint32_t max_matches, VariableList& variables) = 0;
     virtual uint32_t        FindGlobalVariables (const RegularExpression& regex, bool append, uint32_t max_matches, VariableList& variables) = 0;
-    virtual uint32_t        FindFunctions (const ConstString &name, const ClangNamespaceDecl *namespace_decl, uint32_t name_type_mask, bool append, SymbolContextList& sc_list) = 0;
-    virtual uint32_t        FindFunctions (const RegularExpression& regex, bool append, SymbolContextList& sc_list) = 0;
+    virtual uint32_t        FindFunctions (const ConstString &name, const ClangNamespaceDecl *namespace_decl, uint32_t name_type_mask, bool include_inlines, bool append, SymbolContextList& sc_list) = 0;
+    virtual uint32_t        FindFunctions (const RegularExpression& regex, bool include_inlines, bool append, SymbolContextList& sc_list) = 0;
     virtual uint32_t        FindTypes (const SymbolContext& sc, const ConstString &name, const ClangNamespaceDecl *namespace_decl, bool append, uint32_t max_matches, TypeList& types) = 0;
 //  virtual uint32_t        FindTypes (const SymbolContext& sc, const RegularExpression& regex, bool append, uint32_t max_matches, TypeList& types) = 0;
     virtual TypeList *      GetTypeList ();

Modified: lldb/trunk/include/lldb/Symbol/SymbolVendor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolVendor.h?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/SymbolVendor.h (original)
+++ lldb/trunk/include/lldb/Symbol/SymbolVendor.h Fri Feb 10 16:52:19 2012
@@ -113,12 +113,14 @@
     virtual uint32_t
     FindFunctions (const ConstString &name,
                    const ClangNamespaceDecl *namespace_decl,
-                   uint32_t name_type_mask, 
+                   uint32_t name_type_mask,
+                   bool include_inlines,
                    bool append,
                    SymbolContextList& sc_list);
 
     virtual uint32_t
     FindFunctions (const RegularExpression& regex,
+                   bool include_inlines,
                    bool append,
                    SymbolContextList& sc_list);
 

Modified: lldb/trunk/source/API/SBModule.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBModule.cpp?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/API/SBModule.cpp (original)
+++ lldb/trunk/source/API/SBModule.cpp Fri Feb 10 16:52:19 2012
@@ -327,10 +327,12 @@
     {
         const bool append = true;
         const bool symbols_ok = true;
+        const bool inlines_ok = true;
         m_opaque_sp->FindFunctions (ConstString(name),
                                     NULL,
                                     name_type_mask, 
-                                    symbols_ok, 
+                                    symbols_ok,
+                                    inlines_ok,
                                     append, 
                                     *sb_sc_list);
     }

Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Fri Feb 10 16:52:19 2012
@@ -1262,10 +1262,12 @@
         if (target_sp)
         {
             const bool symbols_ok = true;
+            const bool inlines_ok = true;
             const bool append = true;
             target_sp->GetImages().FindFunctions (ConstString(name), 
                                                   name_type_mask, 
-                                                  symbols_ok, 
+                                                  symbols_ok,
+                                                  inlines_ok,
                                                   append, 
                                                   *sb_sc_list);
         }

Modified: lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp Fri Feb 10 16:52:19 2012
@@ -120,6 +120,7 @@
     }
     
     const bool include_symbols = false;
+    const bool include_inlines = true;
     const bool append = false;
     bool filter_by_cu = (filter.GetFilterRequiredItems() & eSymbolContextCompUnit) != 0;
 
@@ -131,7 +132,8 @@
                 uint32_t num_functions = context.module_sp->FindFunctions (m_func_name, 
                                                                            NULL,
                                                                            m_func_name_type_mask, 
-                                                                           include_symbols, 
+                                                                           include_symbols,
+                                                                           include_inlines, 
                                                                            append, 
                                                                            func_list);
                 // If the search filter specifies a Compilation Unit, then we don't need to bother to look in plain
@@ -150,7 +152,8 @@
                 if (!filter_by_cu)
                     context.module_sp->FindSymbolsMatchingRegExAndType (m_regex, eSymbolTypeCode, sym_list);
                 context.module_sp->FindFunctions (m_regex, 
-                                                  include_symbols, 
+                                                  include_symbols,
+                                                  include_inlines, 
                                                   append, 
                                                   func_list);
             }

Modified: lldb/trunk/source/Commands/CommandCompletions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandCompletions.cpp?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandCompletions.cpp (original)
+++ lldb/trunk/source/Commands/CommandCompletions.cpp Fri Feb 10 16:52:19 2012
@@ -618,8 +618,9 @@
     {
         SymbolContextList sc_list;        
         const bool include_symbols = true;
+        const bool include_inlines = true;
         const bool append = true;
-        context.module_sp->FindFunctions (m_regex, include_symbols, append, sc_list);
+        context.module_sp->FindFunctions (m_regex, include_symbols, include_inlines, append, sc_list);
 
         SymbolContext sc;
         // Now add the functions & symbols to the list - only add if unique:

Modified: lldb/trunk/source/Commands/CommandObjectSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSource.cpp?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSource.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSource.cpp Fri Feb 10 16:52:19 2012
@@ -299,6 +299,7 @@
             SymbolContextList sc_list;
             ConstString name(m_options.symbol_name.c_str());
             bool include_symbols = false;
+            bool include_inlines = true;
             bool append = true;
             size_t num_matches = 0;
             
@@ -312,13 +313,13 @@
                     {
                         matching_modules.Clear();
                         target->GetImages().FindModules (&module_spec, NULL, NULL, NULL, matching_modules);
-                        num_matches += matching_modules.FindFunctions (name, eFunctionNameTypeAuto, include_symbols, append, sc_list);
+                        num_matches += matching_modules.FindFunctions (name, eFunctionNameTypeAuto, include_symbols, include_inlines, append, sc_list);
                     }
                 }
             }
             else
             {
-                num_matches = target->GetImages().FindFunctions (name, eFunctionNameTypeAuto, include_symbols, append, sc_list);
+                num_matches = target->GetImages().FindFunctions (name, eFunctionNameTypeAuto, include_symbols, include_inlines, append, sc_list);
             }
             
             SymbolContext sc;

Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Fri Feb 10 16:52:19 2012
@@ -1521,6 +1521,7 @@
     {
         SymbolContextList sc_list;
         const bool include_symbols = false;
+        const bool include_inlines = true;
         const bool append = true;
         uint32_t num_matches = 0;
         if (name_is_regex)
@@ -1528,6 +1529,7 @@
             RegularExpression function_name_regex (name);
             num_matches = module->FindFunctions (function_name_regex, 
                                                  include_symbols,
+                                                 include_inlines, 
                                                  append, 
                                                  sc_list);
         }
@@ -1538,6 +1540,7 @@
                                                  NULL,
                                                  eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector, 
                                                  include_symbols,
+                                                 include_inlines, 
                                                  append, 
                                                  sc_list);
         }

Modified: lldb/trunk/source/Core/AddressResolverName.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/AddressResolverName.cpp?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/Core/AddressResolverName.cpp (original)
+++ lldb/trunk/source/Core/AddressResolverName.cpp Fri Feb 10 16:52:19 2012
@@ -104,6 +104,7 @@
     }
 
     const bool include_symbols = false;
+    const bool include_inlines = true;
     const bool append = false;
     switch (m_match_type)
     {
@@ -117,6 +118,7 @@
                                               NULL,
                                               eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector,
                                               include_symbols,
+                                              include_inlines,
                                               append, 
                                               func_list);
         }
@@ -130,6 +132,7 @@
                                                                 sym_list);
             context.module_sp->FindFunctions (m_regex, 
                                               include_symbols,
+                                              include_inlines,
                                               append, 
                                               func_list);
         }

Modified: lldb/trunk/source/Core/Disassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Disassembler.cpp?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/Core/Disassembler.cpp (original)
+++ lldb/trunk/source/Core/Disassembler.cpp Fri Feb 10 16:52:19 2012
@@ -165,6 +165,7 @@
     if (name)
     {
         const bool include_symbols = true;
+        const bool include_inlines = true;
         if (module)
         {
             module->FindFunctions (name,
@@ -174,6 +175,7 @@
                                    eFunctionNameTypeMethod | 
                                    eFunctionNameTypeSelector, 
                                    include_symbols,
+                                   include_inlines,
                                    true,
                                    sc_list);
         }
@@ -184,7 +186,8 @@
                                                                eFunctionNameTypeFull | 
                                                                eFunctionNameTypeMethod | 
                                                                eFunctionNameTypeSelector,
-                                                               include_symbols, 
+                                                               include_symbols,
+                                                               include_inlines,
                                                                false,
                                                                sc_list);
         }

Modified: lldb/trunk/source/Core/Module.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Module.cpp?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/Core/Module.cpp (original)
+++ lldb/trunk/source/Core/Module.cpp Fri Feb 10 16:52:19 2012
@@ -504,7 +504,8 @@
 Module::FindFunctions (const ConstString &name,
                        const ClangNamespaceDecl *namespace_decl,
                        uint32_t name_type_mask, 
-                       bool include_symbols, 
+                       bool include_symbols,
+                       bool include_inlines,
                        bool append, 
                        SymbolContextList& sc_list)
 {
@@ -516,7 +517,7 @@
     // Find all the functions (not symbols, but debug information functions...
     SymbolVendor *symbols = GetSymbolVendor ();
     if (symbols)
-        symbols->FindFunctions(name, namespace_decl, name_type_mask, append, sc_list);
+        symbols->FindFunctions(name, namespace_decl, name_type_mask, include_inlines, append, sc_list);
 
     // Now check our symbol table for symbols that are code symbols if requested
     if (include_symbols)
@@ -548,7 +549,8 @@
 
 uint32_t
 Module::FindFunctions (const RegularExpression& regex, 
-                       bool include_symbols, 
+                       bool include_symbols,
+                       bool include_inlines,
                        bool append, 
                        SymbolContextList& sc_list)
 {
@@ -559,7 +561,7 @@
     
     SymbolVendor *symbols = GetSymbolVendor ();
     if (symbols)
-        symbols->FindFunctions(regex, append, sc_list);
+        symbols->FindFunctions(regex, include_inlines, append, sc_list);
     // Now check our symbol table for symbols that are code symbols if requested
     if (include_symbols)
     {

Modified: lldb/trunk/source/Core/ModuleList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ModuleList.cpp?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/Core/ModuleList.cpp (original)
+++ lldb/trunk/source/Core/ModuleList.cpp Fri Feb 10 16:52:19 2012
@@ -186,6 +186,7 @@
 ModuleList::FindFunctions (const ConstString &name, 
                            uint32_t name_type_mask, 
                            bool include_symbols,
+                           bool include_inlines,
                            bool append, 
                            SymbolContextList &sc_list)
 {
@@ -196,7 +197,7 @@
     collection::const_iterator pos, end = m_modules.end();
     for (pos = m_modules.begin(); pos != end; ++pos)
     {
-        (*pos)->FindFunctions (name, NULL, name_type_mask, include_symbols, true, sc_list);
+        (*pos)->FindFunctions (name, NULL, name_type_mask, include_symbols, include_inlines, true, sc_list);
     }
     
     return sc_list.GetSize();

Modified: lldb/trunk/source/Core/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/SourceManager.cpp?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/Core/SourceManager.cpp (original)
+++ lldb/trunk/source/Core/SourceManager.cpp Fri Feb 10 16:52:19 2012
@@ -245,8 +245,9 @@
             uint32_t num_matches;
             ConstString main_name("main");
             bool symbols_okay = false;  // Force it to be a debug symbol.
+            bool inlines_okay = true;
             bool append = false;
-            num_matches = executable_ptr->FindFunctions (main_name, NULL, lldb::eFunctionNameTypeBase, symbols_okay, append, sc_list);
+            num_matches = executable_ptr->FindFunctions (main_name, NULL, lldb::eFunctionNameTypeBase, inlines_okay, symbols_okay, append, sc_list);
             for (uint32_t idx = 0; idx < num_matches; idx++)
             {
                 SymbolContext sc;

Modified: lldb/trunk/source/Expression/ClangASTSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangASTSource.cpp?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangASTSource.cpp (original)
+++ lldb/trunk/source/Expression/ClangASTSource.cpp Fri Feb 10 16:52:19 2012
@@ -667,6 +667,7 @@
     SymbolContextList sc_list;
     
     const bool include_symbols = false;
+    const bool include_inlines = false;
     const bool append = false;
     
     std::string interface_name = interface_decl->getNameAsString();
@@ -678,7 +679,7 @@
         ms.Flush();
         ConstString instance_method_name(ms.GetData());
         
-        m_target->GetImages().FindFunctions(instance_method_name, lldb::eFunctionNameTypeFull, include_symbols, append, sc_list);
+        m_target->GetImages().FindFunctions(instance_method_name, lldb::eFunctionNameTypeFull, include_symbols, include_inlines, append, sc_list);
         
         if (sc_list.GetSize())
             break;
@@ -688,7 +689,7 @@
         ms.Flush();
         ConstString class_method_name(ms.GetData());
         
-        m_target->GetImages().FindFunctions(class_method_name, lldb::eFunctionNameTypeFull, include_symbols, append, sc_list);
+        m_target->GetImages().FindFunctions(class_method_name, lldb::eFunctionNameTypeFull, include_symbols, include_inlines, append, sc_list);
         
         if (sc_list.GetSize())
             break;
@@ -698,7 +699,7 @@
         
         SymbolContextList candidate_sc_list;
         
-        m_target->GetImages().FindFunctions(selector_name, lldb::eFunctionNameTypeSelector, include_symbols, append, candidate_sc_list);
+        m_target->GetImages().FindFunctions(selector_name, lldb::eFunctionNameTypeSelector, include_symbols, include_inlines, append, candidate_sc_list);
         
         for (uint32_t ci = 0, ce = candidate_sc_list.GetSize();
              ci != ce;

Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Fri Feb 10 16:52:19 2012
@@ -2586,6 +2586,7 @@
         if (!context.m_found.variable)
         {
             const bool include_symbols = true;
+            const bool include_inlines = false;
             const bool append = false;
             
             if (namespace_decl && module_sp)
@@ -2594,6 +2595,7 @@
                                          &namespace_decl,
                                          eFunctionNameTypeBase, 
                                          include_symbols,
+                                         include_inlines,
                                          append,
                                          sc_list);
             }
@@ -2602,6 +2604,7 @@
                 target->GetImages().FindFunctions(name,
                                                   eFunctionNameTypeBase,
                                                   include_symbols,
+                                                  include_inlines,
                                                   append, 
                                                   sc_list);
             }

Modified: lldb/trunk/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp Fri Feb 10 16:52:19 2012
@@ -30,11 +30,13 @@
 
     const bool append = true;
     const bool include_symbols = true;
+    const bool include_inlines = false;
     SymbolContextList sc_list;
     const uint32_t count
       = process->GetTarget().GetImages().FindFunctions (ConstString ("mmap"), 
                                                         eFunctionNameTypeFull,
-                                                        include_symbols, 
+                                                        include_symbols,
+                                                        include_inlines,
                                                         append, 
                                                         sc_list);
     if (count > 0)
@@ -128,11 +130,13 @@
    
    const bool append = true;
    const bool include_symbols = true;
+   const bool include_inlines = false;
    SymbolContextList sc_list;
    const uint32_t count
      = process->GetTarget().GetImages().FindFunctions (ConstString ("munmap"), 
                                                        eFunctionNameTypeFull,
                                                        include_symbols, 
+                                                       include_inlines,
                                                        append, 
                                                        sc_list);
    if (count > 0)

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Fri Feb 10 16:52:19 2012
@@ -2910,7 +2910,8 @@
 uint32_t
 SymbolFileDWARF::FindFunctions (const ConstString &name, 
                                 const lldb_private::ClangNamespaceDecl *namespace_decl, 
-                                uint32_t name_type_mask, 
+                                uint32_t name_type_mask,
+                                bool include_inlines,
                                 bool append, 
                                 SymbolContextList& sc_list)
 {
@@ -3020,6 +3021,9 @@
                         if (namespace_decl && !DIEIsInNamespace (namespace_decl, dwarf_cu, die))
                             continue;
                         
+                        if (!include_inlines && die->Tag() == DW_TAG_inlined_subroutine)
+                            continue;
+                        
                         ResolveFunction (dwarf_cu, die, sc_list);
                     }
                     else
@@ -3048,7 +3052,12 @@
                         {
                             const char *die_name = die->GetName(this, dwarf_cu);
                             if (ObjCLanguageRuntime::IsPossibleObjCMethodName(die_name))
+                            {
+                                if (!include_inlines && die->Tag() == DW_TAG_inlined_subroutine)
+                                    continue;
+                                
                                 ResolveFunction (dwarf_cu, die, sc_list);
+                            }
                         }
                         else
                         {
@@ -3090,6 +3099,9 @@
                                                                base_name_start, 
                                                                base_name_end))
                                 continue;
+                            
+                            if (!include_inlines && die->Tag() == DW_TAG_inlined_subroutine)
+                                continue;
                                 
                             // If we get to here, the die is good, and we should add it:
                             ResolveFunction (dwarf_cu, die, sc_list);
@@ -3139,6 +3151,9 @@
                                                        base_name_end))
                         continue;
                     
+                    if (!include_inlines && die->Tag() == DW_TAG_inlined_subroutine)
+                        continue;
+                    
                     // If we get to here, the die is good, and we should add it:
                     ResolveFunction (dwarf_cu, die, sc_list);
                 }
@@ -3166,6 +3181,9 @@
                                                            base_name_end))
                             continue;
                         
+                        if (!include_inlines && die->Tag() == DW_TAG_inlined_subroutine)
+                            continue;
+                        
                         // If we get to here, the die is good, and we should add it:
                         ResolveFunction (dwarf_cu, die, sc_list);
                     }
@@ -3186,7 +3204,7 @@
 }
 
 uint32_t
-SymbolFileDWARF::FindFunctions(const RegularExpression& regex, bool append, SymbolContextList& sc_list)
+SymbolFileDWARF::FindFunctions(const RegularExpression& regex, bool include_inlines, bool append, SymbolContextList& sc_list)
 {
     Timer scoped_timer (__PRETTY_FUNCTION__,
                         "SymbolFileDWARF::FindFunctions (regex = '%s')",

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h Fri Feb 10 16:52:19 2012
@@ -113,8 +113,8 @@
     virtual uint32_t        ResolveSymbolContext (const lldb_private::FileSpec& file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, lldb_private::SymbolContextList& sc_list);
     virtual uint32_t        FindGlobalVariables(const lldb_private::ConstString &name, const lldb_private::ClangNamespaceDecl *namespace_decl, bool append, uint32_t max_matches, lldb_private::VariableList& variables);
     virtual uint32_t        FindGlobalVariables(const lldb_private::RegularExpression& regex, bool append, uint32_t max_matches, lldb_private::VariableList& variables);
-    virtual uint32_t        FindFunctions(const lldb_private::ConstString &name, const lldb_private::ClangNamespaceDecl *namespace_decl, uint32_t name_type_mask, bool append, lldb_private::SymbolContextList& sc_list);
-    virtual uint32_t        FindFunctions(const lldb_private::RegularExpression& regex, bool append, lldb_private::SymbolContextList& sc_list);
+    virtual uint32_t        FindFunctions(const lldb_private::ConstString &name, const lldb_private::ClangNamespaceDecl *namespace_decl, uint32_t name_type_mask, bool include_inlines, bool append, lldb_private::SymbolContextList& sc_list);
+    virtual uint32_t        FindFunctions(const lldb_private::RegularExpression& regex, bool include_inlines, bool append, lldb_private::SymbolContextList& sc_list);
     virtual uint32_t        FindTypes (const lldb_private::SymbolContext& sc, const lldb_private::ConstString &name, const lldb_private::ClangNamespaceDecl *namespace_decl, bool append, uint32_t max_matches, lldb_private::TypeList& types);
     virtual lldb_private::TypeList *
                             GetTypeList ();

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp Fri Feb 10 16:52:19 2012
@@ -882,7 +882,7 @@
 }
 
 uint32_t
-SymbolFileDWARFDebugMap::FindFunctions(const ConstString &name, const ClangNamespaceDecl *namespace_decl, uint32_t name_type_mask, bool append, SymbolContextList& sc_list)
+SymbolFileDWARFDebugMap::FindFunctions(const ConstString &name, const ClangNamespaceDecl *namespace_decl, uint32_t name_type_mask, bool include_inlines, bool append, SymbolContextList& sc_list)
 {
     Timer scoped_timer (__PRETTY_FUNCTION__,
                         "SymbolFileDWARFDebugMap::FindFunctions (name = %s)",
@@ -899,7 +899,7 @@
     while ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx++)) != NULL)
     {
         uint32_t sc_idx = sc_list.GetSize();
-        if (oso_dwarf->FindFunctions(name, namespace_decl, name_type_mask, true, sc_list))
+        if (oso_dwarf->FindFunctions(name, namespace_decl, name_type_mask, include_inlines, true, sc_list))
         {
             RemoveFunctionsWithModuleNotEqualTo (m_obj_file->GetModule(), sc_list, sc_idx);
         }
@@ -910,7 +910,7 @@
 
 
 uint32_t
-SymbolFileDWARFDebugMap::FindFunctions (const RegularExpression& regex, bool append, SymbolContextList& sc_list)
+SymbolFileDWARFDebugMap::FindFunctions (const RegularExpression& regex, bool include_inlines, bool append, SymbolContextList& sc_list)
 {
     Timer scoped_timer (__PRETTY_FUNCTION__,
                         "SymbolFileDWARFDebugMap::FindFunctions (regex = '%s')",
@@ -928,7 +928,7 @@
     {
         uint32_t sc_idx = sc_list.GetSize();
         
-        if (oso_dwarf->FindFunctions(regex, true, sc_list))
+        if (oso_dwarf->FindFunctions(regex, include_inlines, true, sc_list))
         {
             RemoveFunctionsWithModuleNotEqualTo (m_obj_file->GetModule(), sc_list, sc_idx);
         }

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h Fri Feb 10 16:52:19 2012
@@ -76,8 +76,8 @@
     virtual uint32_t        ResolveSymbolContext (const lldb_private::FileSpec& file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, lldb_private::SymbolContextList& sc_list);
     virtual uint32_t        FindGlobalVariables (const lldb_private::ConstString &name, const lldb_private::ClangNamespaceDecl *namespace_decl, bool append, uint32_t max_matches, lldb_private::VariableList& variables);
     virtual uint32_t        FindGlobalVariables (const lldb_private::RegularExpression& regex, bool append, uint32_t max_matches, lldb_private::VariableList& variables);
-    virtual uint32_t        FindFunctions (const lldb_private::ConstString &name, const lldb_private::ClangNamespaceDecl *namespace_decl, uint32_t name_type_mask, bool append, lldb_private::SymbolContextList& sc_list);
-    virtual uint32_t        FindFunctions (const lldb_private::RegularExpression& regex, bool append, lldb_private::SymbolContextList& sc_list);
+    virtual uint32_t        FindFunctions (const lldb_private::ConstString &name, const lldb_private::ClangNamespaceDecl *namespace_decl, uint32_t name_type_mask, bool include_inlines, bool append, lldb_private::SymbolContextList& sc_list);
+    virtual uint32_t        FindFunctions (const lldb_private::RegularExpression& regex, bool include_inlines, bool append, lldb_private::SymbolContextList& sc_list);
     virtual uint32_t        FindTypes (const lldb_private::SymbolContext& sc, const lldb_private::ConstString &name, const lldb_private::ClangNamespaceDecl *namespace_decl, bool append, uint32_t max_matches, lldb_private::TypeList& types);
     virtual lldb_private::ClangNamespaceDecl
             FindNamespace (const lldb_private::SymbolContext& sc, 

Modified: lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp Fri Feb 10 16:52:19 2012
@@ -332,7 +332,7 @@
 }
 
 uint32_t
-SymbolFileSymtab::FindFunctions(const ConstString &name, const ClangNamespaceDecl *namespace_decl, uint32_t name_type_mask, bool append, SymbolContextList& sc_list)
+SymbolFileSymtab::FindFunctions(const ConstString &name, const ClangNamespaceDecl *namespace_decl, uint32_t name_type_mask, bool include_inlines,  bool append, SymbolContextList& sc_list)
 {
     Timer scoped_timer (__PRETTY_FUNCTION__,
                         "SymbolFileSymtab::FindFunctions (name = '%s')",
@@ -346,7 +346,7 @@
 }
 
 uint32_t
-SymbolFileSymtab::FindFunctions(const RegularExpression& regex, bool append, SymbolContextList& sc_list)
+SymbolFileSymtab::FindFunctions(const RegularExpression& regex, bool include_inlines, bool append, SymbolContextList& sc_list)
 {
     Timer scoped_timer (__PRETTY_FUNCTION__,
                         "SymbolFileSymtab::FindFunctions (regex = '%s')",

Modified: lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h Fri Feb 10 16:52:19 2012
@@ -91,10 +91,10 @@
     FindGlobalVariables(const lldb_private::RegularExpression& regex, bool append, uint32_t max_matches, lldb_private::VariableList& variables);
 
     virtual uint32_t
-    FindFunctions(const lldb_private::ConstString &name, const lldb_private::ClangNamespaceDecl *namespace_decl, uint32_t name_type_mask, bool append, lldb_private::SymbolContextList& sc_list);
+    FindFunctions(const lldb_private::ConstString &name, const lldb_private::ClangNamespaceDecl *namespace_decl, uint32_t name_type_mask, bool include_inlines, bool append, lldb_private::SymbolContextList& sc_list);
 
     virtual uint32_t
-    FindFunctions(const lldb_private::RegularExpression& regex, bool append, lldb_private::SymbolContextList& sc_list);
+    FindFunctions(const lldb_private::RegularExpression& regex, bool include_inlines, bool append, lldb_private::SymbolContextList& sc_list);
 
     virtual uint32_t
     FindTypes (const lldb_private::SymbolContext& sc,const lldb_private::ConstString &name, const lldb_private::ClangNamespaceDecl *namespace_decl, bool append, uint32_t max_matches, lldb_private::TypeList& types);

Modified: lldb/trunk/source/Symbol/SymbolVendor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolVendor.cpp?rev=150279&r1=150278&r2=150279&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolVendor.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolVendor.cpp Fri Feb 10 16:52:19 2012
@@ -234,20 +234,20 @@
 }
 
 uint32_t
-SymbolVendor::FindFunctions(const ConstString &name, const ClangNamespaceDecl *namespace_decl, uint32_t name_type_mask, bool append, SymbolContextList& sc_list)
+SymbolVendor::FindFunctions(const ConstString &name, const ClangNamespaceDecl *namespace_decl, uint32_t name_type_mask, bool include_inlines, bool append, SymbolContextList& sc_list)
 {
     Mutex::Locker locker(m_mutex);
     if (m_sym_file_ap.get())
-        return m_sym_file_ap->FindFunctions(name, namespace_decl, name_type_mask, append, sc_list);
+        return m_sym_file_ap->FindFunctions(name, namespace_decl, name_type_mask, include_inlines, append, sc_list);
     return 0;
 }
 
 uint32_t
-SymbolVendor::FindFunctions(const RegularExpression& regex, bool append, SymbolContextList& sc_list)
+SymbolVendor::FindFunctions(const RegularExpression& regex, bool include_inlines, bool append, SymbolContextList& sc_list)
 {
     Mutex::Locker locker(m_mutex);
     if (m_sym_file_ap.get())
-        return m_sym_file_ap->FindFunctions(regex, append, sc_list);
+        return m_sym_file_ap->FindFunctions(regex, include_inlines, append, sc_list);
     return 0;
 }
 





More information about the lldb-commits mailing list