62 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPLANPYTHONINTERFACE_H10#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPLANPYTHONINTERFACE_H11 12#include "lldb/Host/Config.h"13#include "lldb/Interpreter/Interfaces/ScriptedThreadPlanInterface.h"14 15#if LLDB_ENABLE_PYTHON16 17#include "ScriptedPythonInterface.h"18 19#include <optional>20 21namespace lldb_private {22class ScriptedThreadPlanPythonInterface : public ScriptedThreadPlanInterface,23 public ScriptedPythonInterface,24 public PluginInterface {25public:26 ScriptedThreadPlanPythonInterface(ScriptInterpreterPythonImpl &interpreter);27 28 llvm::Expected<StructuredData::GenericSP>29 CreatePluginObject(const llvm::StringRef class_name,30 lldb::ThreadPlanSP thread_plan_sp,31 const StructuredDataImpl &args_sp) override;32 33 llvm::SmallVector<AbstractMethodRequirement>34 GetAbstractMethodRequirements() const override {35 return {};36 }37 38 llvm::Expected<bool> ExplainsStop(Event *event) override;39 40 llvm::Expected<bool> ShouldStop(Event *event) override;41 42 llvm::Expected<bool> IsStale() override;43 44 lldb::StateType GetRunState() override;45 46 llvm::Error GetStopDescription(lldb::StreamSP &stream) override;47 48 static void Initialize();49 50 static void Terminate();51 52 static llvm::StringRef GetPluginNameStatic() {53 return "ScriptedThreadPlanPythonInterface";54 }55 56 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }57};58} // namespace lldb_private59 60#endif // LLDB_ENABLE_PYTHON61#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPLANPYTHONINTERFACE_H62