forked from OSchip/llvm-project
[lldb][NFC] Remove strange bool parameter from Searcher::SearchCallback
Summary: The SearchCallback has a bool parameter that we always set to false, we never use in any callback implementation and that also changes its name from one file to the other (either `containing` and `complete`). It was added in the original LLDB check in, so there isn't any history what this was supposed to be, so let's just remove it. Reviewers: jingham, JDevlieghere, labath Reviewed By: jingham, labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68696 llvm-svn: 374313
This commit is contained in:
parent
067bb1f546
commit
95e264fc8a
|
@ -41,8 +41,8 @@ public:
|
|||
ModuleList &modules) override;
|
||||
|
||||
Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context, Address *addr,
|
||||
bool containing) override;
|
||||
SymbolContext &context,
|
||||
Address *addr) override;
|
||||
|
||||
lldb::SearchDepth GetDepth() override;
|
||||
|
||||
|
|
|
@ -35,8 +35,8 @@ public:
|
|||
~BreakpointResolverFileLine() override;
|
||||
|
||||
Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context, Address *addr,
|
||||
bool containing) override;
|
||||
SymbolContext &context,
|
||||
Address *addr) override;
|
||||
|
||||
lldb::SearchDepth GetDepth() override;
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ public:
|
|||
~BreakpointResolverFileRegex() override;
|
||||
|
||||
Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context, Address *addr,
|
||||
bool containing) override;
|
||||
SymbolContext &context,
|
||||
Address *addr) override;
|
||||
|
||||
lldb::SearchDepth GetDepth() override;
|
||||
|
||||
|
|
|
@ -58,8 +58,8 @@ public:
|
|||
~BreakpointResolverName() override;
|
||||
|
||||
Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context, Address *addr,
|
||||
bool containing) override;
|
||||
SymbolContext &context,
|
||||
Address *addr) override;
|
||||
|
||||
lldb::SearchDepth GetDepth() override;
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ public:
|
|||
StructuredData::ObjectSP SerializeToStructuredData() override;
|
||||
|
||||
Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context, Address *addr,
|
||||
bool containing) override;
|
||||
SymbolContext &context,
|
||||
Address *addr) override;
|
||||
|
||||
lldb::SearchDepth GetDepth() override;
|
||||
|
||||
|
|
|
@ -34,8 +34,8 @@ public:
|
|||
~AddressResolverFileLine() override;
|
||||
|
||||
Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context, Address *addr,
|
||||
bool containing) override;
|
||||
SymbolContext &context,
|
||||
Address *addr) override;
|
||||
|
||||
lldb::SearchDepth GetDepth() override;
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ public:
|
|||
~AddressResolverName() override;
|
||||
|
||||
Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context, Address *addr,
|
||||
bool containing) override;
|
||||
SymbolContext &context,
|
||||
Address *addr) override;
|
||||
|
||||
lldb::SearchDepth GetDepth() override;
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ public:
|
|||
~FileLineResolver() override;
|
||||
|
||||
Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context, Address *addr,
|
||||
bool containing) override;
|
||||
SymbolContext &context,
|
||||
Address *addr) override;
|
||||
|
||||
lldb::SearchDepth GetDepth() override;
|
||||
|
||||
|
|
|
@ -52,8 +52,8 @@ public:
|
|||
virtual ~Searcher();
|
||||
|
||||
virtual CallbackReturn SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context, Address *addr,
|
||||
bool complete) = 0;
|
||||
SymbolContext &context,
|
||||
Address *addr) = 0;
|
||||
|
||||
virtual lldb::SearchDepth GetDepth() = 0;
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ public:
|
|||
~Completer() override;
|
||||
|
||||
CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context,
|
||||
Address *addr, bool complete) override = 0;
|
||||
Address *addr) override = 0;
|
||||
|
||||
lldb::SearchDepth GetDepth() override = 0;
|
||||
|
||||
|
@ -127,8 +127,7 @@ public:
|
|||
|
||||
Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context,
|
||||
Address *addr,
|
||||
bool complete) override;
|
||||
Address *addr) override;
|
||||
|
||||
void DoCompletion(SearchFilter *filter) override;
|
||||
|
||||
|
@ -151,8 +150,7 @@ public:
|
|||
|
||||
Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context,
|
||||
Address *addr,
|
||||
bool complete) override;
|
||||
Address *addr) override;
|
||||
|
||||
void DoCompletion(SearchFilter *filter) override;
|
||||
|
||||
|
@ -173,8 +171,7 @@ public:
|
|||
|
||||
Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context,
|
||||
Address *addr,
|
||||
bool complete) override;
|
||||
Address *addr) override;
|
||||
|
||||
void DoCompletion(SearchFilter *filter) override;
|
||||
|
||||
|
|
|
@ -120,10 +120,8 @@ void BreakpointResolverAddress::ResolveBreakpointInModules(
|
|||
BreakpointResolver::ResolveBreakpointInModules(filter, modules);
|
||||
}
|
||||
|
||||
Searcher::CallbackReturn
|
||||
BreakpointResolverAddress::SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context, Address *addr,
|
||||
bool containing) {
|
||||
Searcher::CallbackReturn BreakpointResolverAddress::SearchCallback(
|
||||
SearchFilter &filter, SymbolContext &context, Address *addr) {
|
||||
assert(m_breakpoint != nullptr);
|
||||
|
||||
if (filter.AddressPasses(m_addr)) {
|
||||
|
|
|
@ -198,10 +198,8 @@ void BreakpointResolverFileLine::FilterContexts(SymbolContextList &sc_list,
|
|||
}
|
||||
}
|
||||
|
||||
Searcher::CallbackReturn
|
||||
BreakpointResolverFileLine::SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context,
|
||||
Address *addr, bool containing) {
|
||||
Searcher::CallbackReturn BreakpointResolverFileLine::SearchCallback(
|
||||
SearchFilter &filter, SymbolContext &context, Address *addr) {
|
||||
SymbolContextList sc_list;
|
||||
|
||||
assert(m_breakpoint != nullptr);
|
||||
|
|
|
@ -94,10 +94,8 @@ BreakpointResolverFileRegex::SerializeToStructuredData() {
|
|||
return WrapOptionsDict(options_dict_sp);
|
||||
}
|
||||
|
||||
Searcher::CallbackReturn
|
||||
BreakpointResolverFileRegex::SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context,
|
||||
Address *addr, bool containing) {
|
||||
Searcher::CallbackReturn BreakpointResolverFileRegex::SearchCallback(
|
||||
SearchFilter &filter, SymbolContext &context, Address *addr) {
|
||||
|
||||
assert(m_breakpoint != nullptr);
|
||||
if (!context.target_sp)
|
||||
|
|
|
@ -250,8 +250,7 @@ void BreakpointResolverName::AddNameLookup(ConstString name,
|
|||
|
||||
Searcher::CallbackReturn
|
||||
BreakpointResolverName::SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context, Address *addr,
|
||||
bool containing) {
|
||||
SymbolContext &context, Address *addr) {
|
||||
SymbolContextList func_list;
|
||||
// SymbolContextList sym_list;
|
||||
|
||||
|
|
|
@ -123,10 +123,8 @@ ScriptInterpreter *BreakpointResolverScripted::GetScriptInterpreter() {
|
|||
return m_breakpoint->GetTarget().GetDebugger().GetScriptInterpreter();
|
||||
}
|
||||
|
||||
Searcher::CallbackReturn
|
||||
BreakpointResolverScripted::SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context, Address *addr,
|
||||
bool containing) {
|
||||
Searcher::CallbackReturn BreakpointResolverScripted::SearchCallback(
|
||||
SearchFilter &filter, SymbolContext &context, Address *addr) {
|
||||
assert(m_breakpoint != nullptr);
|
||||
bool should_continue = true;
|
||||
if (!m_implementation_sp)
|
||||
|
|
|
@ -356,8 +356,7 @@ lldb::SearchDepth CommandCompletions::SourceFileCompleter::GetDepth() {
|
|||
Searcher::CallbackReturn
|
||||
CommandCompletions::SourceFileCompleter::SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context,
|
||||
Address *addr,
|
||||
bool complete) {
|
||||
Address *addr) {
|
||||
if (context.comp_unit != nullptr) {
|
||||
if (m_include_support_files) {
|
||||
FileSpecList supporting_files = context.comp_unit->GetSupportFiles();
|
||||
|
@ -443,8 +442,7 @@ lldb::SearchDepth CommandCompletions::SymbolCompleter::GetDepth() {
|
|||
}
|
||||
|
||||
Searcher::CallbackReturn CommandCompletions::SymbolCompleter::SearchCallback(
|
||||
SearchFilter &filter, SymbolContext &context, Address *addr,
|
||||
bool complete) {
|
||||
SearchFilter &filter, SymbolContext &context, Address *addr) {
|
||||
if (context.module_sp) {
|
||||
SymbolContextList sc_list;
|
||||
const bool include_symbols = true;
|
||||
|
@ -491,8 +489,7 @@ lldb::SearchDepth CommandCompletions::ModuleCompleter::GetDepth() {
|
|||
}
|
||||
|
||||
Searcher::CallbackReturn CommandCompletions::ModuleCompleter::SearchCallback(
|
||||
SearchFilter &filter, SymbolContext &context, Address *addr,
|
||||
bool complete) {
|
||||
SearchFilter &filter, SymbolContext &context, Address *addr) {
|
||||
if (context.module_sp) {
|
||||
const char *cur_file_name =
|
||||
context.module_sp->GetFileSpec().GetFilename().GetCString();
|
||||
|
|
|
@ -38,8 +38,7 @@ AddressResolverFileLine::~AddressResolverFileLine() {}
|
|||
|
||||
Searcher::CallbackReturn
|
||||
AddressResolverFileLine::SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context, Address *addr,
|
||||
bool containing) {
|
||||
SymbolContext &context, Address *addr) {
|
||||
SymbolContextList sc_list;
|
||||
uint32_t sc_list_size;
|
||||
CompileUnit *cu = context.comp_unit;
|
||||
|
|
|
@ -67,8 +67,7 @@ AddressResolverName::~AddressResolverName() = default;
|
|||
|
||||
Searcher::CallbackReturn
|
||||
AddressResolverName::SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context, Address *addr,
|
||||
bool containing) {
|
||||
SymbolContext &context, Address *addr) {
|
||||
SymbolContextList func_list;
|
||||
SymbolContextList sym_list;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ FileLineResolver::~FileLineResolver() {}
|
|||
|
||||
Searcher::CallbackReturn
|
||||
FileLineResolver::SearchCallback(SearchFilter &filter, SymbolContext &context,
|
||||
Address *addr, bool containing) {
|
||||
Address *addr) {
|
||||
CompileUnit *cu = context.comp_unit;
|
||||
|
||||
if (m_inlines ||
|
||||
|
|
|
@ -209,7 +209,7 @@ void SearchFilter::Search(Searcher &searcher) {
|
|||
empty_sc.target_sp = m_target_sp;
|
||||
|
||||
if (searcher.GetDepth() == lldb::eSearchDepthTarget)
|
||||
searcher.SearchCallback(*this, empty_sc, nullptr, false);
|
||||
searcher.SearchCallback(*this, empty_sc, nullptr);
|
||||
else
|
||||
DoModuleIteration(empty_sc, searcher);
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ void SearchFilter::SearchInModuleList(Searcher &searcher, ModuleList &modules) {
|
|||
empty_sc.target_sp = m_target_sp;
|
||||
|
||||
if (searcher.GetDepth() == lldb::eSearchDepthTarget)
|
||||
searcher.SearchCallback(*this, empty_sc, nullptr, false);
|
||||
searcher.SearchCallback(*this, empty_sc, nullptr);
|
||||
else {
|
||||
std::lock_guard<std::recursive_mutex> guard(modules.GetMutex());
|
||||
const size_t numModules = modules.GetSize();
|
||||
|
@ -252,7 +252,7 @@ SearchFilter::DoModuleIteration(const SymbolContext &context,
|
|||
if (context.module_sp) {
|
||||
if (searcher.GetDepth() == lldb::eSearchDepthModule) {
|
||||
SymbolContext matchingContext(context.module_sp.get());
|
||||
searcher.SearchCallback(*this, matchingContext, nullptr, false);
|
||||
searcher.SearchCallback(*this, matchingContext, nullptr);
|
||||
} else {
|
||||
return DoCUIteration(context.module_sp, context, searcher);
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ SearchFilter::DoModuleIteration(const SymbolContext &context,
|
|||
SymbolContext matchingContext(m_target_sp, module_sp);
|
||||
|
||||
Searcher::CallbackReturn shouldContinue =
|
||||
searcher.SearchCallback(*this, matchingContext, nullptr, false);
|
||||
searcher.SearchCallback(*this, matchingContext, nullptr);
|
||||
if (shouldContinue == Searcher::eCallbackReturnStop ||
|
||||
shouldContinue == Searcher::eCallbackReturnPop)
|
||||
return shouldContinue;
|
||||
|
@ -306,7 +306,7 @@ SearchFilter::DoCUIteration(const ModuleSP &module_sp,
|
|||
SymbolContext matchingContext(m_target_sp, module_sp, cu_sp.get());
|
||||
|
||||
shouldContinue =
|
||||
searcher.SearchCallback(*this, matchingContext, nullptr, false);
|
||||
searcher.SearchCallback(*this, matchingContext, nullptr);
|
||||
|
||||
if (shouldContinue == Searcher::eCallbackReturnPop)
|
||||
return Searcher::eCallbackReturnContinue;
|
||||
|
@ -328,9 +328,8 @@ SearchFilter::DoCUIteration(const ModuleSP &module_sp,
|
|||
if (searcher.GetDepth() == lldb::eSearchDepthFunction) {
|
||||
SymbolContext matchingContext(m_target_sp, module_sp,
|
||||
cu_sp.get(), func_sp.get());
|
||||
shouldContinue = searcher.SearchCallback(*this,
|
||||
matchingContext,
|
||||
nullptr, false);
|
||||
shouldContinue =
|
||||
searcher.SearchCallback(*this, matchingContext, nullptr);
|
||||
} else {
|
||||
shouldContinue = DoFunctionIteration(func_sp.get(), context,
|
||||
searcher);
|
||||
|
@ -343,7 +342,7 @@ SearchFilter::DoCUIteration(const ModuleSP &module_sp,
|
|||
} else {
|
||||
if (CompUnitPasses(*context.comp_unit)) {
|
||||
SymbolContext matchingContext(m_target_sp, module_sp, context.comp_unit);
|
||||
return searcher.SearchCallback(*this, matchingContext, nullptr, false);
|
||||
return searcher.SearchCallback(*this, matchingContext, nullptr);
|
||||
}
|
||||
}
|
||||
return Searcher::eCallbackReturnContinue;
|
||||
|
@ -431,7 +430,7 @@ void SearchFilterByModule::Search(Searcher &searcher) {
|
|||
if (searcher.GetDepth() == lldb::eSearchDepthTarget) {
|
||||
SymbolContext empty_sc;
|
||||
empty_sc.target_sp = m_target_sp;
|
||||
searcher.SearchCallback(*this, empty_sc, nullptr, false);
|
||||
searcher.SearchCallback(*this, empty_sc, nullptr);
|
||||
}
|
||||
|
||||
// If the module file spec is a full path, then we can just find the one
|
||||
|
@ -568,7 +567,7 @@ void SearchFilterByModuleList::Search(Searcher &searcher) {
|
|||
if (searcher.GetDepth() == lldb::eSearchDepthTarget) {
|
||||
SymbolContext empty_sc;
|
||||
empty_sc.target_sp = m_target_sp;
|
||||
searcher.SearchCallback(*this, empty_sc, nullptr, false);
|
||||
searcher.SearchCallback(*this, empty_sc, nullptr);
|
||||
}
|
||||
|
||||
// If the module file spec is a full path, then we can just find the one
|
||||
|
@ -777,7 +776,7 @@ void SearchFilterByModuleListAndCU::Search(Searcher &searcher) {
|
|||
if (searcher.GetDepth() == lldb::eSearchDepthTarget) {
|
||||
SymbolContext empty_sc;
|
||||
empty_sc.target_sp = m_target_sp;
|
||||
searcher.SearchCallback(*this, empty_sc, nullptr, false);
|
||||
searcher.SearchCallback(*this, empty_sc, nullptr);
|
||||
}
|
||||
|
||||
// If the module file spec is a full path, then we can just find the one
|
||||
|
|
|
@ -790,7 +790,7 @@ RenderScriptRuntime::CreateInstance(Process *process,
|
|||
// symbol.
|
||||
Searcher::CallbackReturn
|
||||
RSBreakpointResolver::SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context, Address *, bool) {
|
||||
SymbolContext &context, Address *) {
|
||||
ModuleSP module = context.module_sp;
|
||||
|
||||
if (!module || !IsRenderScriptScriptModule(module))
|
||||
|
@ -820,7 +820,7 @@ RSBreakpointResolver::SearchCallback(SearchFilter &filter,
|
|||
Searcher::CallbackReturn
|
||||
RSReduceBreakpointResolver::SearchCallback(lldb_private::SearchFilter &filter,
|
||||
lldb_private::SymbolContext &context,
|
||||
Address *, bool) {
|
||||
Address *) {
|
||||
// We need to have access to the list of reductions currently parsed, as
|
||||
// reduce names don't actually exist as symbols in a module. They are only
|
||||
// identifiable by parsing the .rs.info packet, or finding the expand symbol.
|
||||
|
@ -880,8 +880,7 @@ RSReduceBreakpointResolver::SearchCallback(lldb_private::SearchFilter &filter,
|
|||
}
|
||||
|
||||
Searcher::CallbackReturn RSScriptGroupBreakpointResolver::SearchCallback(
|
||||
SearchFilter &filter, SymbolContext &context, Address *addr,
|
||||
bool containing) {
|
||||
SearchFilter &filter, SymbolContext &context, Address *addr) {
|
||||
|
||||
if (!m_breakpoint)
|
||||
return eCallbackReturnContinue;
|
||||
|
|
|
@ -67,8 +67,8 @@ public:
|
|||
void Dump(Stream *s) const override {}
|
||||
|
||||
Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context, Address *addr,
|
||||
bool containing) override;
|
||||
SymbolContext &context,
|
||||
Address *addr) override;
|
||||
|
||||
lldb::SearchDepth GetDepth() override { return lldb::eSearchDepthModule; }
|
||||
|
||||
|
@ -117,8 +117,8 @@ public:
|
|||
void Dump(Stream *s) const override {}
|
||||
|
||||
Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context, Address *addr,
|
||||
bool containing) override;
|
||||
SymbolContext &context,
|
||||
Address *addr) override;
|
||||
|
||||
lldb::SearchDepth GetDepth() override { return lldb::eSearchDepthModule; }
|
||||
|
||||
|
@ -262,8 +262,8 @@ public:
|
|||
void Dump(Stream *s) const override {}
|
||||
|
||||
Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context, Address *addr,
|
||||
bool containing) override;
|
||||
SymbolContext &context,
|
||||
Address *addr) override;
|
||||
|
||||
lldb::SearchDepth GetDepth() override { return lldb::eSearchDepthModule; }
|
||||
|
||||
|
|
|
@ -111,12 +111,11 @@ public:
|
|||
~ExceptionBreakpointResolver() override = default;
|
||||
|
||||
Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
|
||||
SymbolContext &context, Address *addr,
|
||||
bool containing) override {
|
||||
SymbolContext &context,
|
||||
Address *addr) override {
|
||||
|
||||
if (SetActualResolver())
|
||||
return m_actual_resolver_sp->SearchCallback(filter, context, addr,
|
||||
containing);
|
||||
return m_actual_resolver_sp->SearchCallback(filter, context, addr);
|
||||
else
|
||||
return eCallbackReturnStop;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue