From 3f4f8599a3cc7bfd07566473d15fb1a6aa9745b8 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Thu, 10 Oct 2019 11:26:51 +0000 Subject: [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 git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@374313 91177308-0d34-0410-b5e6-96231b3b80d8 --- source/Breakpoint/BreakpointResolverAddress.cpp | 6 ++---- source/Breakpoint/BreakpointResolverFileLine.cpp | 6 ++---- source/Breakpoint/BreakpointResolverFileRegex.cpp | 6 ++---- source/Breakpoint/BreakpointResolverName.cpp | 3 +-- source/Breakpoint/BreakpointResolverScripted.cpp | 6 ++---- source/Commands/CommandCompletions.cpp | 9 +++------ source/Core/AddressResolverFileLine.cpp | 3 +-- source/Core/AddressResolverName.cpp | 3 +-- source/Core/FileLineResolver.cpp | 2 +- source/Core/SearchFilter.cpp | 23 +++++++++++----------- .../RenderScriptRuntime/RenderScriptRuntime.cpp | 7 +++---- .../RenderScriptRuntime/RenderScriptRuntime.h | 12 +++++------ source/Target/LanguageRuntime.cpp | 7 +++---- 13 files changed, 38 insertions(+), 55 deletions(-) (limited to 'source') diff --git a/source/Breakpoint/BreakpointResolverAddress.cpp b/source/Breakpoint/BreakpointResolverAddress.cpp index cc14a134e..b98568098 100644 --- a/source/Breakpoint/BreakpointResolverAddress.cpp +++ b/source/Breakpoint/BreakpointResolverAddress.cpp @@ -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)) { diff --git a/source/Breakpoint/BreakpointResolverFileLine.cpp b/source/Breakpoint/BreakpointResolverFileLine.cpp index a6095be31..2b26f6581 100644 --- a/source/Breakpoint/BreakpointResolverFileLine.cpp +++ b/source/Breakpoint/BreakpointResolverFileLine.cpp @@ -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); diff --git a/source/Breakpoint/BreakpointResolverFileRegex.cpp b/source/Breakpoint/BreakpointResolverFileRegex.cpp index 94135a59f..3cb04263c 100644 --- a/source/Breakpoint/BreakpointResolverFileRegex.cpp +++ b/source/Breakpoint/BreakpointResolverFileRegex.cpp @@ -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) diff --git a/source/Breakpoint/BreakpointResolverName.cpp b/source/Breakpoint/BreakpointResolverName.cpp index c3c05b3b7..59b74dc29 100644 --- a/source/Breakpoint/BreakpointResolverName.cpp +++ b/source/Breakpoint/BreakpointResolverName.cpp @@ -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; diff --git a/source/Breakpoint/BreakpointResolverScripted.cpp b/source/Breakpoint/BreakpointResolverScripted.cpp index c6833ae10..cbf163ed6 100644 --- a/source/Breakpoint/BreakpointResolverScripted.cpp +++ b/source/Breakpoint/BreakpointResolverScripted.cpp @@ -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) diff --git a/source/Commands/CommandCompletions.cpp b/source/Commands/CommandCompletions.cpp index 00ba108f3..43354c7e3 100644 --- a/source/Commands/CommandCompletions.cpp +++ b/source/Commands/CommandCompletions.cpp @@ -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(); diff --git a/source/Core/AddressResolverFileLine.cpp b/source/Core/AddressResolverFileLine.cpp index 33a7bb186..4a14260c6 100644 --- a/source/Core/AddressResolverFileLine.cpp +++ b/source/Core/AddressResolverFileLine.cpp @@ -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; diff --git a/source/Core/AddressResolverName.cpp b/source/Core/AddressResolverName.cpp index 089f0da44..665d6aa68 100644 --- a/source/Core/AddressResolverName.cpp +++ b/source/Core/AddressResolverName.cpp @@ -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; diff --git a/source/Core/FileLineResolver.cpp b/source/Core/FileLineResolver.cpp index 3cba1c7e8..01df29539 100644 --- a/source/Core/FileLineResolver.cpp +++ b/source/Core/FileLineResolver.cpp @@ -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 || diff --git a/source/Core/SearchFilter.cpp b/source/Core/SearchFilter.cpp index 22c8997ed..e02b4f66b 100644 --- a/source/Core/SearchFilter.cpp +++ b/source/Core/SearchFilter.cpp @@ -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 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 diff --git a/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp index ad1b3411c..5200749d7 100644 --- a/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp +++ b/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp @@ -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; diff --git a/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h b/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h index 3923221d4..c3740ba55 100644 --- a/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h +++ b/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h @@ -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; } diff --git a/source/Target/LanguageRuntime.cpp b/source/Target/LanguageRuntime.cpp index dd4415810..999ac99e9 100644 --- a/source/Target/LanguageRuntime.cpp +++ b/source/Target/LanguageRuntime.cpp @@ -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; } -- cgit v1.2.3