teemperor created this revision.
teemperor added reviewers: jingham, JDevlieghere, labath.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

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.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D68696

Files:
  lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h
  lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h
  lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
  lldb/include/lldb/Breakpoint/BreakpointResolverName.h
  lldb/include/lldb/Breakpoint/BreakpointResolverScripted.h
  lldb/include/lldb/Core/AddressResolverFileLine.h
  lldb/include/lldb/Core/AddressResolverName.h
  lldb/include/lldb/Core/FileLineResolver.h
  lldb/include/lldb/Core/SearchFilter.h
  lldb/include/lldb/Interpreter/CommandCompletions.h
  lldb/source/Breakpoint/BreakpointResolverAddress.cpp
  lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
  lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
  lldb/source/Breakpoint/BreakpointResolverName.cpp
  lldb/source/Breakpoint/BreakpointResolverScripted.cpp
  lldb/source/Commands/CommandCompletions.cpp
  lldb/source/Core/AddressResolverFileLine.cpp
  lldb/source/Core/AddressResolverName.cpp
  lldb/source/Core/FileLineResolver.cpp
  lldb/source/Core/SearchFilter.cpp
  
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
  
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
  lldb/source/Target/LanguageRuntime.cpp

Index: lldb/source/Target/LanguageRuntime.cpp
===================================================================
--- lldb/source/Target/LanguageRuntime.cpp
+++ lldb/source/Target/LanguageRuntime.cpp
@@ -111,12 +111,11 @@
   ~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;
   }
Index: lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
===================================================================
--- lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
+++ lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
@@ -67,8 +67,8 @@
   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 @@
   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 @@
   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; }
 
Index: lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
===================================================================
--- lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
+++ lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
@@ -790,7 +790,7 @@
 // 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 @@
 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 @@
 }
 
 Searcher::CallbackReturn RSScriptGroupBreakpointResolver::SearchCallback(
-    SearchFilter &filter, SymbolContext &context, Address *addr,
-    bool containing) {
+    SearchFilter &filter, SymbolContext &context, Address *addr) {
 
   if (!m_breakpoint)
     return eCallbackReturnContinue;
Index: lldb/source/Core/SearchFilter.cpp
===================================================================
--- lldb/source/Core/SearchFilter.cpp
+++ lldb/source/Core/SearchFilter.cpp
@@ -209,7 +209,7 @@
   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 @@
   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 @@
     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 @@
           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 @@
           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 @@
             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 @@
   } 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 @@
   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 @@
   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 @@
   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
Index: lldb/source/Core/FileLineResolver.cpp
===================================================================
--- lldb/source/Core/FileLineResolver.cpp
+++ lldb/source/Core/FileLineResolver.cpp
@@ -33,7 +33,7 @@
 
 Searcher::CallbackReturn
 FileLineResolver::SearchCallback(SearchFilter &filter, SymbolContext &context,
-                                 Address *addr, bool containing) {
+                                 Address *addr) {
   CompileUnit *cu = context.comp_unit;
 
   if (m_inlines ||
Index: lldb/source/Core/AddressResolverName.cpp
===================================================================
--- lldb/source/Core/AddressResolverName.cpp
+++ lldb/source/Core/AddressResolverName.cpp
@@ -67,8 +67,7 @@
 
 Searcher::CallbackReturn
 AddressResolverName::SearchCallback(SearchFilter &filter,
-                                    SymbolContext &context, Address *addr,
-                                    bool containing) {
+                                    SymbolContext &context, Address *addr) {
   SymbolContextList func_list;
   SymbolContextList sym_list;
 
Index: lldb/source/Core/AddressResolverFileLine.cpp
===================================================================
--- lldb/source/Core/AddressResolverFileLine.cpp
+++ lldb/source/Core/AddressResolverFileLine.cpp
@@ -38,8 +38,7 @@
 
 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;
Index: lldb/source/Commands/CommandCompletions.cpp
===================================================================
--- lldb/source/Commands/CommandCompletions.cpp
+++ lldb/source/Commands/CommandCompletions.cpp
@@ -356,8 +356,7 @@
 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 @@
 }
 
 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 @@
 }
 
 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();
Index: lldb/source/Breakpoint/BreakpointResolverScripted.cpp
===================================================================
--- lldb/source/Breakpoint/BreakpointResolverScripted.cpp
+++ lldb/source/Breakpoint/BreakpointResolverScripted.cpp
@@ -123,10 +123,8 @@
   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)
Index: lldb/source/Breakpoint/BreakpointResolverName.cpp
===================================================================
--- lldb/source/Breakpoint/BreakpointResolverName.cpp
+++ lldb/source/Breakpoint/BreakpointResolverName.cpp
@@ -250,8 +250,7 @@
 
 Searcher::CallbackReturn
 BreakpointResolverName::SearchCallback(SearchFilter &filter,
-                                       SymbolContext &context, Address *addr,
-                                       bool containing) {
+                                       SymbolContext &context, Address *addr) {
   SymbolContextList func_list;
   // SymbolContextList sym_list;
 
Index: lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
===================================================================
--- lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
+++ lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
@@ -94,10 +94,8 @@
   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)
Index: lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
===================================================================
--- lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
+++ lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
@@ -198,10 +198,8 @@
   }
 }
 
-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);
Index: lldb/source/Breakpoint/BreakpointResolverAddress.cpp
===================================================================
--- lldb/source/Breakpoint/BreakpointResolverAddress.cpp
+++ lldb/source/Breakpoint/BreakpointResolverAddress.cpp
@@ -120,10 +120,8 @@
     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)) {
Index: lldb/include/lldb/Interpreter/CommandCompletions.h
===================================================================
--- lldb/include/lldb/Interpreter/CommandCompletions.h
+++ lldb/include/lldb/Interpreter/CommandCompletions.h
@@ -103,7 +103,7 @@
     ~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 @@
 
     Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
                                             SymbolContext &context,
-                                            Address *addr,
-                                            bool complete) override;
+                                            Address *addr) override;
 
     void DoCompletion(SearchFilter *filter) override;
 
@@ -151,8 +150,7 @@
 
     Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
                                             SymbolContext &context,
-                                            Address *addr,
-                                            bool complete) override;
+                                            Address *addr) override;
 
     void DoCompletion(SearchFilter *filter) override;
 
@@ -173,8 +171,7 @@
 
     Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
                                             SymbolContext &context,
-                                            Address *addr,
-                                            bool complete) override;
+                                            Address *addr) override;
 
     void DoCompletion(SearchFilter *filter) override;
 
Index: lldb/include/lldb/Core/SearchFilter.h
===================================================================
--- lldb/include/lldb/Core/SearchFilter.h
+++ lldb/include/lldb/Core/SearchFilter.h
@@ -52,8 +52,8 @@
   virtual ~Searcher();
 
   virtual CallbackReturn SearchCallback(SearchFilter &filter,
-                                        SymbolContext &context, Address *addr,
-                                        bool complete) = 0;
+                                        SymbolContext &context,
+                                        Address *addr) = 0;
 
   virtual lldb::SearchDepth GetDepth() = 0;
 
Index: lldb/include/lldb/Core/FileLineResolver.h
===================================================================
--- lldb/include/lldb/Core/FileLineResolver.h
+++ lldb/include/lldb/Core/FileLineResolver.h
@@ -37,8 +37,8 @@
   ~FileLineResolver() override;
 
   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) override;
+                                          SymbolContext &context,
+                                          Address *addr) override;
 
   lldb::SearchDepth GetDepth() override;
 
Index: lldb/include/lldb/Core/AddressResolverName.h
===================================================================
--- lldb/include/lldb/Core/AddressResolverName.h
+++ lldb/include/lldb/Core/AddressResolverName.h
@@ -39,8 +39,8 @@
   ~AddressResolverName() override;
 
   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) override;
+                                          SymbolContext &context,
+                                          Address *addr) override;
 
   lldb::SearchDepth GetDepth() override;
 
Index: lldb/include/lldb/Core/AddressResolverFileLine.h
===================================================================
--- lldb/include/lldb/Core/AddressResolverFileLine.h
+++ lldb/include/lldb/Core/AddressResolverFileLine.h
@@ -34,8 +34,8 @@
   ~AddressResolverFileLine() override;
 
   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) override;
+                                          SymbolContext &context,
+                                          Address *addr) override;
 
   lldb::SearchDepth GetDepth() override;
 
Index: lldb/include/lldb/Breakpoint/BreakpointResolverScripted.h
===================================================================
--- lldb/include/lldb/Breakpoint/BreakpointResolverScripted.h
+++ lldb/include/lldb/Breakpoint/BreakpointResolverScripted.h
@@ -39,8 +39,8 @@
   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;
 
Index: lldb/include/lldb/Breakpoint/BreakpointResolverName.h
===================================================================
--- lldb/include/lldb/Breakpoint/BreakpointResolverName.h
+++ lldb/include/lldb/Breakpoint/BreakpointResolverName.h
@@ -58,8 +58,8 @@
   ~BreakpointResolverName() override;
 
   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) override;
+                                          SymbolContext &context,
+                                          Address *addr) override;
 
   lldb::SearchDepth GetDepth() override;
 
Index: lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
===================================================================
--- lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
+++ lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
@@ -37,8 +37,8 @@
   ~BreakpointResolverFileRegex() override;
 
   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) override;
+                                          SymbolContext &context,
+                                          Address *addr) override;
 
   lldb::SearchDepth GetDepth() override;
 
Index: lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h
===================================================================
--- lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h
+++ lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h
@@ -35,8 +35,8 @@
   ~BreakpointResolverFileLine() override;
 
   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) override;
+                                          SymbolContext &context,
+                                          Address *addr) override;
 
   lldb::SearchDepth GetDepth() override;
 
Index: lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h
===================================================================
--- lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h
+++ lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h
@@ -41,8 +41,8 @@
                                   ModuleList &modules) override;
 
   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) override;
+                                          SymbolContext &context,
+                                          Address *addr) override;
 
   lldb::SearchDepth GetDepth() override;
 
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to