diff options
author | Jim Ingham <jingham@apple.com> | 2018-09-07 18:43:04 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2018-09-07 18:43:04 +0000 |
commit | 063ea399d66ebc49b13d5a32d2292f2a197cf826 (patch) | |
tree | bab16b85ee73f2a26d31a2b4d3c3d368384b7af3 /lldb | |
parent | 654932c56f78d6b06f421906e020e38919a305e1 (diff) |
NFC: Move Searcher::Depth into lldb-enumerations as SearchDepth.
In a subsequent commit, I will need to expose the search depth
to the SB API's, so I'm moving this define into lldb-enumerations
where it will get added to the lldb module.
Diffstat (limited to 'lldb')
21 files changed, 57 insertions, 56 deletions
diff --git a/lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h b/lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h index 5845fe7cabe..0cbf38327b4 100644 --- a/lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h +++ b/lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h @@ -51,7 +51,7 @@ public: SymbolContext &context, Address *addr, bool containing) override; - Searcher::Depth GetDepth() override; + lldb::SearchDepth GetDepth() override; void GetDescription(Stream *s) override; diff --git a/lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h b/lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h index 539591f7fbc..75602e21d83 100644 --- a/lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h +++ b/lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h @@ -45,7 +45,7 @@ public: SymbolContext &context, Address *addr, bool containing) override; - Searcher::Depth GetDepth() override; + lldb::SearchDepth GetDepth() override; void GetDescription(Stream *s) override; diff --git a/lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h b/lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h index c1a7a15566a..2db3c24d58f 100644 --- a/lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h +++ b/lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h @@ -47,7 +47,7 @@ public: SymbolContext &context, Address *addr, bool containing) override; - Searcher::Depth GetDepth() override; + lldb::SearchDepth GetDepth() override; void GetDescription(Stream *s) override; diff --git a/lldb/include/lldb/Breakpoint/BreakpointResolverName.h b/lldb/include/lldb/Breakpoint/BreakpointResolverName.h index 794ea67bb72..b5aa8b7e6b2 100644 --- a/lldb/include/lldb/Breakpoint/BreakpointResolverName.h +++ b/lldb/include/lldb/Breakpoint/BreakpointResolverName.h @@ -65,7 +65,7 @@ public: SymbolContext &context, Address *addr, bool containing) override; - Searcher::Depth GetDepth() override; + lldb::SearchDepth GetDepth() override; void GetDescription(Stream *s) override; diff --git a/lldb/include/lldb/Core/AddressResolverFileLine.h b/lldb/include/lldb/Core/AddressResolverFileLine.h index e434a62e031..5d846e3be72 100644 --- a/lldb/include/lldb/Core/AddressResolverFileLine.h +++ b/lldb/include/lldb/Core/AddressResolverFileLine.h @@ -47,7 +47,7 @@ public: SymbolContext &context, Address *addr, bool containing) override; - Searcher::Depth GetDepth() override; + lldb::SearchDepth GetDepth() override; void GetDescription(Stream *s) override; diff --git a/lldb/include/lldb/Core/AddressResolverName.h b/lldb/include/lldb/Core/AddressResolverName.h index 49a805f2115..ec8cf6d18d5 100644 --- a/lldb/include/lldb/Core/AddressResolverName.h +++ b/lldb/include/lldb/Core/AddressResolverName.h @@ -52,7 +52,7 @@ public: SymbolContext &context, Address *addr, bool containing) override; - Searcher::Depth GetDepth() override; + lldb::SearchDepth GetDepth() override; void GetDescription(Stream *s) override; diff --git a/lldb/include/lldb/Core/FileLineResolver.h b/lldb/include/lldb/Core/FileLineResolver.h index 855d749ed5d..61a06d499fe 100644 --- a/lldb/include/lldb/Core/FileLineResolver.h +++ b/lldb/include/lldb/Core/FileLineResolver.h @@ -48,7 +48,7 @@ public: SymbolContext &context, Address *addr, bool containing) override; - Searcher::Depth GetDepth() override; + lldb::SearchDepth GetDepth() override; void GetDescription(Stream *s) override; diff --git a/lldb/include/lldb/Core/SearchFilter.h b/lldb/include/lldb/Core/SearchFilter.h index 2e641983dc7..08d4b9505bd 100644 --- a/lldb/include/lldb/Core/SearchFilter.h +++ b/lldb/include/lldb/Core/SearchFilter.h @@ -70,15 +70,6 @@ public: eCallbackReturnPop // Pop one level up and continue iterating } CallbackReturn; - typedef enum { - eDepthTarget, - eDepthModule, - eDepthCompUnit, - eDepthFunction, - eDepthBlock, - eDepthAddress - } Depth; - Searcher(); virtual ~Searcher(); @@ -87,7 +78,7 @@ public: SymbolContext &context, Address *addr, bool complete) = 0; - virtual Depth GetDepth() = 0; + virtual lldb::SearchDepth GetDepth() = 0; //------------------------------------------------------------------ /// Prints a canonical description for the searcher to the stream \a s. diff --git a/lldb/include/lldb/Interpreter/CommandCompletions.h b/lldb/include/lldb/Interpreter/CommandCompletions.h index d17864e05f3..15e7525fdcd 100644 --- a/lldb/include/lldb/Interpreter/CommandCompletions.h +++ b/lldb/include/lldb/Interpreter/CommandCompletions.h @@ -116,7 +116,7 @@ public: CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context, Address *addr, bool complete) override = 0; - Depth GetDepth() override = 0; + lldb::SearchDepth GetDepth() override = 0; virtual size_t DoCompletion(SearchFilter *filter) = 0; @@ -136,7 +136,7 @@ public: SourceFileCompleter(CommandInterpreter &interpreter, bool include_support_files, CompletionRequest &request); - Searcher::Depth GetDepth() override; + lldb::SearchDepth GetDepth() override; Searcher::CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context, @@ -162,7 +162,7 @@ public: ModuleCompleter(CommandInterpreter &interpreter, CompletionRequest &request); - Searcher::Depth GetDepth() override; + lldb::SearchDepth GetDepth() override; Searcher::CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context, @@ -186,7 +186,7 @@ public: SymbolCompleter(CommandInterpreter &interpreter, CompletionRequest &request); - Searcher::Depth GetDepth() override; + lldb::SearchDepth GetDepth() override; Searcher::CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context, diff --git a/lldb/include/lldb/lldb-enumerations.h b/lldb/include/lldb/lldb-enumerations.h index a1f73037953..33b01c9d5b8 100644 --- a/lldb/include/lldb/lldb-enumerations.h +++ b/lldb/include/lldb/lldb-enumerations.h @@ -256,6 +256,16 @@ enum ExpressionResults { eExpressionStoppedForDebug }; +enum SearchDepth { + eSearchDepthTarget = 0, + eSearchDepthModule, + eSearchDepthCompUnit, + eSearchDepthFunction, + eSearchDepthBlock, + eSearchDepthAddress, + kNumSearchDepthKinds = eSearchDepthAddress +}; + //---------------------------------------------------------------------- // Connection Status Types //---------------------------------------------------------------------- diff --git a/lldb/source/Breakpoint/BreakpointResolverAddress.cpp b/lldb/source/Breakpoint/BreakpointResolverAddress.cpp index d4647e2c589..194a7d1c7da 100644 --- a/lldb/source/Breakpoint/BreakpointResolverAddress.cpp +++ b/lldb/source/Breakpoint/BreakpointResolverAddress.cpp @@ -173,8 +173,8 @@ BreakpointResolverAddress::SearchCallback(SearchFilter &filter, return Searcher::eCallbackReturnStop; } -Searcher::Depth BreakpointResolverAddress::GetDepth() { - return Searcher::eDepthTarget; +lldb::SearchDepth BreakpointResolverAddress::GetDepth() { + return lldb::eSearchDepthTarget; } void BreakpointResolverAddress::GetDescription(Stream *s) { diff --git a/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp b/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp index 76223f25790..476da412edb 100644 --- a/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp +++ b/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp @@ -257,8 +257,8 @@ BreakpointResolverFileLine::SearchCallback(SearchFilter &filter, return Searcher::eCallbackReturnContinue; } -Searcher::Depth BreakpointResolverFileLine::GetDepth() { - return Searcher::eDepthModule; +lldb::SearchDepth BreakpointResolverFileLine::GetDepth() { + return lldb::eSearchDepthModule; } void BreakpointResolverFileLine::GetDescription(Stream *s) { diff --git a/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp b/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp index 54c05a04246..8a15f8ec7e4 100644 --- a/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp +++ b/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp @@ -157,8 +157,8 @@ BreakpointResolverFileRegex::SearchCallback(SearchFilter &filter, return Searcher::eCallbackReturnContinue; } -Searcher::Depth BreakpointResolverFileRegex::GetDepth() { - return Searcher::eDepthCompUnit; +lldb::SearchDepth BreakpointResolverFileRegex::GetDepth() { + return lldb::eSearchDepthCompUnit; } void BreakpointResolverFileRegex::GetDescription(Stream *s) { diff --git a/lldb/source/Breakpoint/BreakpointResolverName.cpp b/lldb/source/Breakpoint/BreakpointResolverName.cpp index ba277ae2655..d171a7234d1 100644 --- a/lldb/source/Breakpoint/BreakpointResolverName.cpp +++ b/lldb/source/Breakpoint/BreakpointResolverName.cpp @@ -396,8 +396,8 @@ BreakpointResolverName::SearchCallback(SearchFilter &filter, return Searcher::eCallbackReturnContinue; } -Searcher::Depth BreakpointResolverName::GetDepth() { - return Searcher::eDepthModule; +lldb::SearchDepth BreakpointResolverName::GetDepth() { + return lldb::eSearchDepthModule; } void BreakpointResolverName::GetDescription(Stream *s) { diff --git a/lldb/source/Commands/CommandCompletions.cpp b/lldb/source/Commands/CommandCompletions.cpp index fc3e8d0662d..fbc9a33f501 100644 --- a/lldb/source/Commands/CommandCompletions.cpp +++ b/lldb/source/Commands/CommandCompletions.cpp @@ -366,8 +366,8 @@ CommandCompletions::SourceFileCompleter::SourceFileCompleter( m_dir_name = partial_spec.GetDirectory().GetCString(); } -Searcher::Depth CommandCompletions::SourceFileCompleter::GetDepth() { - return eDepthCompUnit; +lldb::SearchDepth CommandCompletions::SourceFileCompleter::GetDepth() { + return lldb::eSearchDepthCompUnit; } Searcher::CallbackReturn @@ -458,8 +458,8 @@ CommandCompletions::SymbolCompleter::SymbolCompleter( m_regex.Compile(regex_str); } -Searcher::Depth CommandCompletions::SymbolCompleter::GetDepth() { - return eDepthModule; +lldb::SearchDepth CommandCompletions::SymbolCompleter::GetDepth() { + return lldb::eSearchDepthModule; } Searcher::CallbackReturn CommandCompletions::SymbolCompleter::SearchCallback( @@ -506,8 +506,8 @@ CommandCompletions::ModuleCompleter::ModuleCompleter( m_dir_name = partial_spec.GetDirectory().GetCString(); } -Searcher::Depth CommandCompletions::ModuleCompleter::GetDepth() { - return eDepthModule; +lldb::SearchDepth CommandCompletions::ModuleCompleter::GetDepth() { + return lldb::eSearchDepthModule; } Searcher::CallbackReturn CommandCompletions::ModuleCompleter::SearchCallback( diff --git a/lldb/source/Core/AddressResolverFileLine.cpp b/lldb/source/Core/AddressResolverFileLine.cpp index 798a9b50079..3295ef174a7 100644 --- a/lldb/source/Core/AddressResolverFileLine.cpp +++ b/lldb/source/Core/AddressResolverFileLine.cpp @@ -78,8 +78,8 @@ AddressResolverFileLine::SearchCallback(SearchFilter &filter, return Searcher::eCallbackReturnContinue; } -Searcher::Depth AddressResolverFileLine::GetDepth() { - return Searcher::eDepthCompUnit; +lldb::SearchDepth AddressResolverFileLine::GetDepth() { + return lldb::eSearchDepthCompUnit; } void AddressResolverFileLine::GetDescription(Stream *s) { diff --git a/lldb/source/Core/AddressResolverName.cpp b/lldb/source/Core/AddressResolverName.cpp index c3dab6d1081..ec03815cf5f 100644 --- a/lldb/source/Core/AddressResolverName.cpp +++ b/lldb/source/Core/AddressResolverName.cpp @@ -186,8 +186,8 @@ AddressResolverName::SearchCallback(SearchFilter &filter, return Searcher::eCallbackReturnContinue; } -Searcher::Depth AddressResolverName::GetDepth() { - return Searcher::eDepthModule; +lldb::SearchDepth AddressResolverName::GetDepth() { + return lldb::eSearchDepthModule; } void AddressResolverName::GetDescription(Stream *s) { diff --git a/lldb/source/Core/FileLineResolver.cpp b/lldb/source/Core/FileLineResolver.cpp index 7f0f440252e..083377692ed 100644 --- a/lldb/source/Core/FileLineResolver.cpp +++ b/lldb/source/Core/FileLineResolver.cpp @@ -68,8 +68,8 @@ FileLineResolver::SearchCallback(SearchFilter &filter, SymbolContext &context, return Searcher::eCallbackReturnContinue; } -Searcher::Depth FileLineResolver::GetDepth() { - return Searcher::eDepthCompUnit; +lldb::SearchDepth FileLineResolver::GetDepth() { + return lldb::eSearchDepthCompUnit; } void FileLineResolver::GetDescription(Stream *s) { diff --git a/lldb/source/Core/SearchFilter.cpp b/lldb/source/Core/SearchFilter.cpp index 0701955233a..c4519b2139c 100644 --- a/lldb/source/Core/SearchFilter.cpp +++ b/lldb/source/Core/SearchFilter.cpp @@ -207,7 +207,7 @@ void SearchFilter::Search(Searcher &searcher) { return; empty_sc.target_sp = m_target_sp; - if (searcher.GetDepth() == Searcher::eDepthTarget) + if (searcher.GetDepth() == lldb::eSearchDepthTarget) searcher.SearchCallback(*this, empty_sc, nullptr, false); else DoModuleIteration(empty_sc, searcher); @@ -220,7 +220,7 @@ void SearchFilter::SearchInModuleList(Searcher &searcher, ModuleList &modules) { return; empty_sc.target_sp = m_target_sp; - if (searcher.GetDepth() == Searcher::eDepthTarget) + if (searcher.GetDepth() == lldb::eSearchDepthTarget) searcher.SearchCallback(*this, empty_sc, nullptr, false); else { std::lock_guard<std::recursive_mutex> guard(modules.GetMutex()); @@ -247,9 +247,9 @@ SearchFilter::DoModuleIteration(const lldb::ModuleSP &module_sp, Searcher::CallbackReturn SearchFilter::DoModuleIteration(const SymbolContext &context, Searcher &searcher) { - if (searcher.GetDepth() >= Searcher::eDepthModule) { + if (searcher.GetDepth() >= lldb::eSearchDepthModule) { if (context.module_sp) { - if (searcher.GetDepth() == Searcher::eDepthModule) { + if (searcher.GetDepth() == lldb::eSearchDepthModule) { SymbolContext matchingContext(context.module_sp.get()); searcher.SearchCallback(*this, matchingContext, nullptr, false); } else { @@ -267,7 +267,7 @@ SearchFilter::DoModuleIteration(const SymbolContext &context, if (!ModulePasses(module_sp)) continue; - if (searcher.GetDepth() == Searcher::eDepthModule) { + if (searcher.GetDepth() == lldb::eSearchDepthModule) { SymbolContext matchingContext(m_target_sp, module_sp); Searcher::CallbackReturn shouldContinue = @@ -301,7 +301,7 @@ SearchFilter::DoCUIteration(const ModuleSP &module_sp, if (!CompUnitPasses(*(cu_sp.get()))) continue; - if (searcher.GetDepth() == Searcher::eDepthCompUnit) { + if (searcher.GetDepth() == lldb::eSearchDepthCompUnit) { SymbolContext matchingContext(m_target_sp, module_sp, cu_sp.get()); shouldContinue = @@ -421,7 +421,7 @@ void SearchFilterByModule::Search(Searcher &searcher) { if (!m_target_sp) return; - if (searcher.GetDepth() == Searcher::eDepthTarget) { + if (searcher.GetDepth() == lldb::eSearchDepthTarget) { SymbolContext empty_sc; empty_sc.target_sp = m_target_sp; searcher.SearchCallback(*this, empty_sc, nullptr, false); @@ -570,7 +570,7 @@ void SearchFilterByModuleList::Search(Searcher &searcher) { if (!m_target_sp) return; - if (searcher.GetDepth() == Searcher::eDepthTarget) { + if (searcher.GetDepth() == lldb::eSearchDepthTarget) { SymbolContext empty_sc; empty_sc.target_sp = m_target_sp; searcher.SearchCallback(*this, empty_sc, nullptr, false); @@ -773,7 +773,7 @@ void SearchFilterByModuleListAndCU::Search(Searcher &searcher) { if (!m_target_sp) return; - if (searcher.GetDepth() == Searcher::eDepthTarget) { + if (searcher.GetDepth() == lldb::eSearchDepthTarget) { SymbolContext empty_sc; empty_sc.target_sp = m_target_sp; searcher.SearchCallback(*this, empty_sc, nullptr, false); @@ -797,7 +797,7 @@ void SearchFilterByModuleListAndCU::Search(Searcher &searcher) { SymbolContext matchingContext(m_target_sp, module_sp); Searcher::CallbackReturn shouldContinue; - if (searcher.GetDepth() == Searcher::eDepthModule) { + if (searcher.GetDepth() == lldb::eSearchDepthModule) { shouldContinue = DoModuleIteration(matchingContext, searcher); if (shouldContinue == Searcher::eCallbackReturnStop) return; diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h index 0fe9134ce9e..e99025439a1 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h @@ -74,7 +74,7 @@ public: SymbolContext &context, Address *addr, bool containing) override; - Searcher::Depth GetDepth() override { return Searcher::eDepthModule; } + lldb::SearchDepth GetDepth() override { return lldb::eSearchDepthModule; } lldb::BreakpointResolverSP CopyForBreakpoint(Breakpoint &breakpoint) override { @@ -124,7 +124,7 @@ public: SymbolContext &context, Address *addr, bool containing) override; - Searcher::Depth GetDepth() override { return Searcher::eDepthModule; } + lldb::SearchDepth GetDepth() override { return lldb::eSearchDepthModule; } lldb::BreakpointResolverSP CopyForBreakpoint(Breakpoint &breakpoint) override { @@ -269,7 +269,7 @@ public: SymbolContext &context, Address *addr, bool containing) override; - Searcher::Depth GetDepth() override { return Searcher::eDepthModule; } + lldb::SearchDepth GetDepth() override { return lldb::eSearchDepthModule; } lldb::BreakpointResolverSP CopyForBreakpoint(Breakpoint &breakpoint) override { diff --git a/lldb/source/Target/LanguageRuntime.cpp b/lldb/source/Target/LanguageRuntime.cpp index bd02121f6a4..22ad2d25ee1 100644 --- a/lldb/source/Target/LanguageRuntime.cpp +++ b/lldb/source/Target/LanguageRuntime.cpp @@ -125,11 +125,11 @@ public: return eCallbackReturnStop; } - Searcher::Depth GetDepth() override { + lldb::SearchDepth GetDepth() override { if (SetActualResolver()) return m_actual_resolver_sp->GetDepth(); else - return eDepthTarget; + return lldb::eSearchDepthTarget; } void GetDescription(Stream *s) override { |