60 lines · c
1//===----------------------------------------------------------------------===//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_SCRIPTEDFRAMEPYTHONINTERFACE_H10#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDFRAMEPYTHONINTERFACE_H11 12#include "lldb/Host/Config.h"13 14#if LLDB_ENABLE_PYTHON15 16#include "ScriptedPythonInterface.h"17#include "lldb/Interpreter/Interfaces/ScriptedFrameInterface.h"18#include <optional>19 20namespace lldb_private {21class ScriptedFramePythonInterface : public ScriptedFrameInterface,22 public ScriptedPythonInterface {23public:24 ScriptedFramePythonInterface(ScriptInterpreterPythonImpl &interpreter);25 26 llvm::Expected<StructuredData::GenericSP>27 CreatePluginObject(llvm::StringRef class_name, ExecutionContext &exe_ctx,28 StructuredData::DictionarySP args_sp,29 StructuredData::Generic *script_obj = nullptr) override;30 31 llvm::SmallVector<AbstractMethodRequirement>32 GetAbstractMethodRequirements() const override {33 return llvm::SmallVector<AbstractMethodRequirement>({{"get_id"}});34 }35 36 lldb::user_id_t GetID() override;37 38 lldb::addr_t GetPC() override;39 40 std::optional<SymbolContext> GetSymbolContext() override;41 42 std::optional<std::string> GetFunctionName() override;43 44 std::optional<std::string> GetDisplayFunctionName() override;45 46 bool IsInlined() override;47 48 bool IsArtificial() override;49 50 bool IsHidden() override;51 52 StructuredData::DictionarySP GetRegisterInfo() override;53 54 std::optional<std::string> GetRegisterContext() override;55};56} // namespace lldb_private57 58#endif // LLDB_ENABLE_PYTHON59#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDFRAMEPYTHONINTERFACE_H60