mirror of
https://github.com/intel/llvm.git
synced 2026-01-13 19:08:21 +08:00
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. llvm-svn: 150279
This commit is contained in:
@@ -271,7 +271,8 @@ public:
|
||||
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 @@ public:
|
||||
uint32_t
|
||||
FindFunctions (const RegularExpression& regex,
|
||||
bool symbols_ok,
|
||||
bool inlines_ok,
|
||||
bool append,
|
||||
SymbolContextList& sc_list);
|
||||
|
||||
|
||||
@@ -182,6 +182,7 @@ public:
|
||||
FindFunctions (const ConstString &name,
|
||||
uint32_t name_type_mask,
|
||||
bool include_symbols,
|
||||
bool include_inlines,
|
||||
bool append,
|
||||
SymbolContextList &sc_list);
|
||||
|
||||
|
||||
@@ -133,8 +133,8 @@ public:
|
||||
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 ();
|
||||
|
||||
@@ -113,12 +113,14 @@ public:
|
||||
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);
|
||||
|
||||
|
||||
@@ -327,10 +327,12 @@ SBModule::FindFunctions (const char *name,
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -1262,10 +1262,12 @@ SBTarget::FindFunctions (const char *name, uint32_t name_type_mask)
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -120,6 +120,7 @@ BreakpointResolverName::SearchCallback
|
||||
}
|
||||
|
||||
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 @@ BreakpointResolverName::SearchCallback
|
||||
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 @@ BreakpointResolverName::SearchCallback
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -618,8 +618,9 @@ CommandCompletions::SymbolCompleter::SearchCallback (
|
||||
{
|
||||
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:
|
||||
|
||||
@@ -299,6 +299,7 @@ public:
|
||||
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 @@ public:
|
||||
{
|
||||
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;
|
||||
|
||||
@@ -1521,6 +1521,7 @@ LookupFunctionInModule (CommandInterpreter &interpreter, Stream &strm, Module *m
|
||||
{
|
||||
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 @@ LookupFunctionInModule (CommandInterpreter &interpreter, Stream &strm, Module *m
|
||||
RegularExpression function_name_regex (name);
|
||||
num_matches = module->FindFunctions (function_name_regex,
|
||||
include_symbols,
|
||||
include_inlines,
|
||||
append,
|
||||
sc_list);
|
||||
}
|
||||
@@ -1538,6 +1540,7 @@ LookupFunctionInModule (CommandInterpreter &interpreter, Stream &strm, Module *m
|
||||
NULL,
|
||||
eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector,
|
||||
include_symbols,
|
||||
include_inlines,
|
||||
append,
|
||||
sc_list);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -667,6 +667,7 @@ ClangASTSource::FindObjCMethodDecls (NameSearchContext &context)
|
||||
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 @@ ClangASTSource::FindObjCMethodDecls (NameSearchContext &context)
|
||||
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 @@ ClangASTSource::FindObjCMethodDecls (NameSearchContext &context)
|
||||
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 @@ ClangASTSource::FindObjCMethodDecls (NameSearchContext &context)
|
||||
|
||||
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;
|
||||
|
||||
@@ -2586,6 +2586,7 @@ ClangExpressionDeclMap::FindExternalVisibleDecls (NameSearchContext &context,
|
||||
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 @@ ClangExpressionDeclMap::FindExternalVisibleDecls (NameSearchContext &context,
|
||||
&namespace_decl,
|
||||
eFunctionNameTypeBase,
|
||||
include_symbols,
|
||||
include_inlines,
|
||||
append,
|
||||
sc_list);
|
||||
}
|
||||
@@ -2602,6 +2604,7 @@ ClangExpressionDeclMap::FindExternalVisibleDecls (NameSearchContext &context,
|
||||
target->GetImages().FindFunctions(name,
|
||||
eFunctionNameTypeBase,
|
||||
include_symbols,
|
||||
include_inlines,
|
||||
append,
|
||||
sc_list);
|
||||
}
|
||||
|
||||
@@ -30,11 +30,13 @@ bool lldb_private::InferiorCallMmap(Process *process, addr_t &allocated_addr,
|
||||
|
||||
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 @@ bool lldb_private::InferiorCallMunmap(Process *process, addr_t addr,
|
||||
|
||||
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)
|
||||
|
||||
@@ -2910,7 +2910,8 @@ SymbolFileDWARF::FunctionDieMatchesPartialName (const DWARFDebugInfoEntry* die,
|
||||
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 @@ SymbolFileDWARF::FindFunctions (const ConstString &name,
|
||||
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 @@ SymbolFileDWARF::FindFunctions (const ConstString &name,
|
||||
{
|
||||
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 @@ SymbolFileDWARF::FindFunctions (const ConstString &name,
|
||||
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 @@ SymbolFileDWARF::FindFunctions (const ConstString &name,
|
||||
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 @@ SymbolFileDWARF::FindFunctions (const ConstString &name,
|
||||
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 @@ SymbolFileDWARF::FindFunctions (const ConstString &name,
|
||||
}
|
||||
|
||||
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')",
|
||||
|
||||
@@ -113,8 +113,8 @@ public:
|
||||
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 ();
|
||||
|
||||
@@ -882,7 +882,7 @@ RemoveFunctionsWithModuleNotEqualTo (Module *module, SymbolContextList &sc_list,
|
||||
}
|
||||
|
||||
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 @@ SymbolFileDWARFDebugMap::FindFunctions(const ConstString &name, const ClangNames
|
||||
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 @@ SymbolFileDWARFDebugMap::FindFunctions(const ConstString &name, const ClangNames
|
||||
|
||||
|
||||
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 @@ SymbolFileDWARFDebugMap::FindFunctions (const RegularExpression& regex, bool app
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -76,8 +76,8 @@ public:
|
||||
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,
|
||||
|
||||
@@ -332,7 +332,7 @@ SymbolFileSymtab::FindGlobalVariables(const RegularExpression& regex, bool appen
|
||||
}
|
||||
|
||||
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 @@ SymbolFileSymtab::FindFunctions(const ConstString &name, const ClangNamespaceDec
|
||||
}
|
||||
|
||||
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')",
|
||||
|
||||
@@ -91,10 +91,10 @@ public:
|
||||
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);
|
||||
|
||||
@@ -234,20 +234,20 @@ SymbolVendor::FindGlobalVariables (const RegularExpression& regex, bool append,
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user