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 
31   llvm::Expected<bool> ExplainsStop(Event *event) override;
32 
33   llvm::Expected<bool> ShouldStop(Event *event) override;
34 
35   llvm::Expected<bool> IsStale() override;
36 
37   lldb::StateType GetRunState() override;
38 
39   llvm::Expected<bool> GetStopDescription(lldb_private::Stream *s) override;
40 };
41 } // namespace lldb_private
42 
43 #endif // LLDB_ENABLE_PYTHON
44 #endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPLANPYTHONINTERFACE_H
45