45 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_SCRIPTEDFRAMEPROVIDERPYTHONINTERFACE_H10#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDFRAMEPROVIDERPYTHONINTERFACE_H11 12#include "lldb/Host/Config.h"13 14#if LLDB_ENABLE_PYTHON15 16#include "ScriptedPythonInterface.h"17#include "lldb/Interpreter/Interfaces/ScriptedFrameProviderInterface.h"18#include <optional>19 20namespace lldb_private {21class ScriptedFrameProviderPythonInterface22 : public ScriptedFrameProviderInterface,23 public ScriptedPythonInterface {24public:25 ScriptedFrameProviderPythonInterface(26 ScriptInterpreterPythonImpl &interpreter);27 28 llvm::Expected<StructuredData::GenericSP>29 CreatePluginObject(llvm::StringRef class_name,30 lldb::StackFrameListSP input_frames,31 StructuredData::DictionarySP args_sp) override;32 33 llvm::SmallVector<AbstractMethodRequirement>34 GetAbstractMethodRequirements() const override {35 return llvm::SmallVector<AbstractMethodRequirement>(36 {{"get_frame_at_index"}});37 }38 39 StructuredData::ObjectSP GetFrameAtIndex(uint32_t index) override;40};41} // namespace lldb_private42 43#endif // LLDB_ENABLE_PYTHON44#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDFRAMEPROVIDERPYTHONINTERFACE_H45