diff options
Diffstat (limited to 'contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPlanPythonInterface.cpp')
| -rw-r--r-- | contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPlanPythonInterface.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPlanPythonInterface.cpp b/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPlanPythonInterface.cpp index f23858c01277..14c48a4e4a11 100644 --- a/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPlanPythonInterface.cpp +++ b/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPlanPythonInterface.cpp @@ -6,14 +6,17 @@ // //===----------------------------------------------------------------------===// +#include "lldb/Core/PluginManager.h" #include "lldb/Host/Config.h" #include "lldb/Utility/Log.h" #include "lldb/lldb-enumerations.h" #if LLDB_ENABLE_PYTHON +// clang-format off // LLDB Python header must be included first #include "../lldb-python.h" +//clang-format on #include "../SWIGPythonBridge.h" #include "../ScriptInterpreterPythonImpl.h" @@ -102,4 +105,19 @@ ScriptedThreadPlanPythonInterface::GetStopDescription(lldb::StreamSP &stream) { return llvm::Error::success(); } +void ScriptedThreadPlanPythonInterface::Initialize() { + const std::vector<llvm::StringRef> ci_usages = { + "thread step-scripted -C <script-name> [-k key -v value ...]"}; + const std::vector<llvm::StringRef> api_usages = { + "SBThread.StepUsingScriptedThreadPlan"}; + PluginManager::RegisterPlugin( + GetPluginNameStatic(), + llvm::StringRef("Alter thread stepping logic and stop reason"), + CreateInstance, eScriptLanguagePython, {ci_usages, api_usages}); +} + +void ScriptedThreadPlanPythonInterface::Terminate() { + PluginManager::UnregisterPlugin(CreateInstance); +} + #endif |
