1 //===-- ScriptedThreadPlanPythonInterface.h ---------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPLANPYTHONINTERFACE_H 10 #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPLANPYTHONINTERFACE_H 11 12 #include "lldb/Host/Config.h" 13 14 #if LLDB_ENABLE_PYTHON 15 16 #include "ScriptedPythonInterface.h" 17 #include "lldb/Interpreter/Interfaces/ScriptedThreadPlanInterface.h" 18 #include <optional> 19 20 namespace lldb_private { 21 class ScriptedThreadPlanPythonInterface : public ScriptedThreadPlanInterface, 22 public ScriptedPythonInterface { 23 public: 24 ScriptedThreadPlanPythonInterface(ScriptInterpreterPythonImpl &interpreter); 25 26 llvm::Expected<StructuredData::GenericSP> 27 CreatePluginObject(const llvm::StringRef class_name, 28 lldb::ThreadPlanSP thread_plan_sp, 29 const StructuredDataImpl &args_sp) override; 30 GetAbstractMethods()31 llvm::SmallVector<llvm::StringLiteral> GetAbstractMethods() const override { 32 return {}; 33 } 34 35 llvm::Expected<bool> ExplainsStop(Event *event) override; 36 37 llvm::Expected<bool> ShouldStop(Event *event) override; 38 39 llvm::Expected<bool> IsStale() override; 40 41 lldb::StateType GetRunState() override; 42 43 llvm::Error GetStopDescription(lldb::StreamSP &stream) override; 44 }; 45 } // namespace lldb_private 46 47 #endif // LLDB_ENABLE_PYTHON 48 #endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPLANPYTHONINTERFACE_H 49