LLDB mainline
ScriptedFramePythonInterface.h
Go to the documentation of this file.
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-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDFRAMEPYTHONINTERFACE_H
10#define LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDFRAMEPYTHONINTERFACE_H
11
14#include <optional>
15
16namespace lldb_private {
19 public PluginInterface {
20public:
22
23 llvm::Expected<StructuredData::GenericSP>
24 CreatePluginObject(llvm::StringRef class_name, ExecutionContext &exe_ctx,
26 StructuredData::Generic *script_obj = nullptr) override;
27
28 llvm::SmallVector<AbstractMethodRequirement>
30 return llvm::SmallVector<AbstractMethodRequirement>({{"get_id"}});
31 }
32
33 llvm::SmallVector<llvm::StringLiteral> GetOptionalMethods() const override {
34 return {"get_plan_spec_for_step_type"};
35 }
36
37 lldb::user_id_t GetID() override;
38
39 lldb::addr_t GetPC() override;
40
41 lldb::addr_t GetCFA() override;
42
43 std::optional<SymbolContext> GetSymbolContext() override;
44
45 std::optional<std::string> GetFunctionName() override;
46
47 std::optional<std::string> GetDisplayFunctionName() override;
48
49 bool IsInlined() override;
50
51 bool IsArtificial() override;
52
53 bool IsHidden() override;
54
56
57 std::optional<std::string> GetRegisterContext() override;
58
60
61 std::optional<lldb::ValueType>
63
65 GetValueObjectForVariableExpression(llvm::StringRef expr, uint32_t options,
66 Status &status) override;
67 llvm::Expected<ScriptedMetadata>
69
70 static void Initialize();
71
72 static void Terminate();
73
74 static llvm::StringRef GetPluginNameStatic() {
75 return "ScriptedFramePythonInterface";
76 }
77
78 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
79};
80} // namespace lldb_private
81
82#endif // LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDFRAMEPYTHONINTERFACE_H
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
std::optional< std::string > GetRegisterContext() override
std::optional< lldb::ValueType > GetValueTypeForVariable(lldb::ValueObjectSP value) override
Report which kind of variable valobj is presented as, for instance eValueTypeVariableLocal to have it...
llvm::Expected< ScriptedMetadata > GetThreadPlanMetadataForStepType(lldb::StepType step_type) override
std::optional< std::string > GetDisplayFunctionName() override
llvm::SmallVector< llvm::StringLiteral > GetOptionalMethods() const override
Methods a script may legitimately leave out, for which LLDB has a documented answer.
llvm::SmallVector< AbstractMethodRequirement > GetAbstractMethodRequirements() const override
std::optional< SymbolContext > GetSymbolContext() override
StructuredData::DictionarySP GetRegisterInfo() override
lldb::ValueObjectSP GetValueObjectForVariableExpression(llvm::StringRef expr, uint32_t options, Status &status) override
std::optional< std::string > GetFunctionName() override
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(llvm::StringRef class_name, ExecutionContext &exe_ctx, StructuredData::DictionarySP args_sp, StructuredData::Generic *script_obj=nullptr) override
ScriptedFramePythonInterface(ScriptInterpreterPythonImpl &interpreter)
ScriptedPythonInterface(ScriptInterpreterPythonImpl &interpreter)
An error handling class.
Definition Status.h:118
std::shared_ptr< Dictionary > DictionarySP
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
std::shared_ptr< lldb_private::ValueObjectList > ValueObjectListSP
uint64_t user_id_t
Definition lldb-types.h:83
uint64_t addr_t
Definition lldb-types.h:80