diff options
author | Sean Callanan <scallanan@apple.com> | 2012-02-10 22:52:19 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2012-02-10 22:52:19 +0000 |
commit | 8b976676e3cdcaec8ded4c00bdcfe08a63a3ba1f (patch) | |
tree | f4af77fe468cdf83c390a1d919bd09c12b160e71 /lldb/source/Core | |
parent | ab2421be769bcbdaad83cf11c174ac01919997fe (diff) |
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.
Diffstat (limited to 'lldb/source/Core')
-rw-r--r-- | lldb/source/Core/AddressResolverName.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Core/Disassembler.cpp | 5 | ||||
-rw-r--r-- | lldb/source/Core/Module.cpp | 10 | ||||
-rw-r--r-- | lldb/source/Core/ModuleList.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Core/SourceManager.cpp | 3 |
5 files changed, 17 insertions, 7 deletions
diff --git a/lldb/source/Core/AddressResolverName.cpp b/lldb/source/Core/AddressResolverName.cpp index 82187004199..091a02f448f 100644 --- a/lldb/source/Core/AddressResolverName.cpp +++ b/lldb/source/Core/AddressResolverName.cpp @@ -104,6 +104,7 @@ AddressResolverName::SearchCallback } const bool include_symbols = false; + const bool include_inlines = true; const bool append = false; switch (m_match_type) { @@ -117,6 +118,7 @@ AddressResolverName::SearchCallback NULL, eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector, include_symbols, + include_inlines, append, func_list); } @@ -130,6 +132,7 @@ AddressResolverName::SearchCallback sym_list); context.module_sp->FindFunctions (m_regex, include_symbols, + include_inlines, append, func_list); } diff --git a/lldb/source/Core/Disassembler.cpp b/lldb/source/Core/Disassembler.cpp index d6b19acdaa3..cd694d603c1 100644 --- a/lldb/source/Core/Disassembler.cpp +++ b/lldb/source/Core/Disassembler.cpp @@ -165,6 +165,7 @@ Disassembler::Disassemble if (name) { const bool include_symbols = true; + const bool include_inlines = true; if (module) { module->FindFunctions (name, @@ -174,6 +175,7 @@ Disassembler::Disassemble eFunctionNameTypeMethod | eFunctionNameTypeSelector, include_symbols, + include_inlines, true, sc_list); } @@ -184,7 +186,8 @@ Disassembler::Disassemble eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector, - include_symbols, + include_symbols, + include_inlines, false, sc_list); } diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index c4d62842f09..707b651c194 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -504,7 +504,8 @@ uint32_t 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 @@ Module::FindFunctions (const ConstString &name, // 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 @@ Module::FindFunctions (const ConstString &name, 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 @@ Module::FindFunctions (const RegularExpression& regex, 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) { diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp index 8f372c51727..360c868cb5a 100644 --- a/lldb/source/Core/ModuleList.cpp +++ b/lldb/source/Core/ModuleList.cpp @@ -186,6 +186,7 @@ uint32_t 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 @@ ModuleList::FindFunctions (const ConstString &name, 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(); diff --git a/lldb/source/Core/SourceManager.cpp b/lldb/source/Core/SourceManager.cpp index de24b1e0b39..4d077b3bfe4 100644 --- a/lldb/source/Core/SourceManager.cpp +++ b/lldb/source/Core/SourceManager.cpp @@ -245,8 +245,9 @@ SourceManager::GetDefaultFileAndLine (FileSpec &file_spec, uint32_t &line) 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; |