[mlir] Update Ch-2.md (#121379)
[llvm-project.git] / lldb / source / Plugins / ScriptInterpreter / Python / Interfaces / ScriptedThreadPlanPythonInterface.h
blob2d017396df7e27968ee2e57a7d480f84edb52973
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 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPLANPYTHONINTERFACE_H
10 #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPLANPYTHONINTERFACE_H
12 #include "lldb/Host/Config.h"
13 #include "lldb/Interpreter/Interfaces/ScriptedThreadPlanInterface.h"
15 #if LLDB_ENABLE_PYTHON
17 #include "ScriptedPythonInterface.h"
19 #include <optional>
21 namespace lldb_private {
22 class ScriptedThreadPlanPythonInterface : public ScriptedThreadPlanInterface,
23 public ScriptedPythonInterface,
24 public PluginInterface {
25 public:
26 ScriptedThreadPlanPythonInterface(ScriptInterpreterPythonImpl &interpreter);
28 llvm::Expected<StructuredData::GenericSP>
29 CreatePluginObject(const llvm::StringRef class_name,
30 lldb::ThreadPlanSP thread_plan_sp,
31 const StructuredDataImpl &args_sp) override;
33 llvm::SmallVector<AbstractMethodRequirement>
34 GetAbstractMethodRequirements() const override {
35 return {};
38 llvm::Expected<bool> ExplainsStop(Event *event) override;
40 llvm::Expected<bool> ShouldStop(Event *event) override;
42 llvm::Expected<bool> IsStale() override;
44 lldb::StateType GetRunState() override;
46 llvm::Error GetStopDescription(lldb::StreamSP &stream) override;
48 static void Initialize();
50 static void Terminate();
52 static llvm::StringRef GetPluginNameStatic() {
53 return "ScriptedThreadPlanPythonInterface";
56 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
58 } // namespace lldb_private
60 #endif // LLDB_ENABLE_PYTHON
61 #endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPLANPYTHONINTERFACE_H