diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectFrame.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectFrame.cpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp index 6ebad9b..b42020d 100644 --- a/lldb/source/Commands/CommandObjectFrame.cpp +++ b/lldb/source/Commands/CommandObjectFrame.cpp @@ -898,12 +898,14 @@ bool CommandObjectFrameRecognizerAdd::DoExecute(Args &command, RegularExpressionSP(new RegularExpression(m_options.m_module)); auto func = RegularExpressionSP(new RegularExpression(m_options.m_symbols.front())); - StackFrameRecognizerManager::AddRecognizer(recognizer_sp, module, func); + GetSelectedOrDummyTarget().GetFrameRecognizerManager().AddRecognizer( + recognizer_sp, module, func); } else { auto module = ConstString(m_options.m_module); std::vector<ConstString> symbols(m_options.m_symbols.begin(), m_options.m_symbols.end()); - StackFrameRecognizerManager::AddRecognizer(recognizer_sp, module, symbols); + GetSelectedOrDummyTarget().GetFrameRecognizerManager().AddRecognizer( + recognizer_sp, module, symbols); } #endif @@ -921,7 +923,9 @@ public: protected: bool DoExecute(Args &command, CommandReturnObject &result) override { - StackFrameRecognizerManager::RemoveAllRecognizers(); + GetSelectedOrDummyTarget() + .GetFrameRecognizerManager() + .RemoveAllRecognizers(); result.SetStatus(eReturnStatusSuccessFinishResult); return result.Succeeded(); } @@ -941,7 +945,7 @@ public: if (request.GetCursorIndex() != 0) return; - StackFrameRecognizerManager::ForEach( + GetSelectedOrDummyTarget().GetFrameRecognizerManager().ForEach( [&request](uint32_t rid, std::string rname, std::string module, llvm::ArrayRef<lldb_private::ConstString> symbols, bool regexp) { @@ -973,7 +977,9 @@ protected: return false; } - StackFrameRecognizerManager::RemoveAllRecognizers(); + GetSelectedOrDummyTarget() + .GetFrameRecognizerManager() + .RemoveAllRecognizers(); result.SetStatus(eReturnStatusSuccessFinishResult); return result.Succeeded(); } @@ -993,7 +999,9 @@ protected: return false; } - StackFrameRecognizerManager::RemoveRecognizerWithID(recognizer_id); + GetSelectedOrDummyTarget() + .GetFrameRecognizerManager() + .RemoveRecognizerWithID(recognizer_id); result.SetStatus(eReturnStatusSuccessFinishResult); return result.Succeeded(); } @@ -1011,7 +1019,7 @@ public: protected: bool DoExecute(Args &command, CommandReturnObject &result) override { bool any_printed = false; - StackFrameRecognizerManager::ForEach( + GetSelectedOrDummyTarget().GetFrameRecognizerManager().ForEach( [&result, &any_printed]( uint32_t recognizer_id, std::string name, std::string module, llvm::ArrayRef<ConstString> symbols, bool regexp) { @@ -1106,8 +1114,9 @@ protected: return false; } - auto recognizer = - StackFrameRecognizerManager::GetRecognizerForFrame(frame_sp); + auto recognizer = GetSelectedOrDummyTarget() + .GetFrameRecognizerManager() + .GetRecognizerForFrame(frame_sp); Stream &output_stream = result.GetOutputStream(); output_stream.Printf("frame %d ", frame_index); |