LLDB
mainline
llvm-project
lldb
source
Plugins
ScriptInterpreter
Python
Interfaces
ScriptedThreadPythonInterface.h
Go to the documentation of this file.
1
//===-- ScriptedThreadPythonInterface.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
//===----------------------------------------------------------------------===//
8
9
#ifndef LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPYTHONINTERFACE_H
10
#define LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPYTHONINTERFACE_H
11
12
#include "
ScriptedPythonInterface.h
"
13
#include "
lldb/Interpreter/Interfaces/ScriptedThreadInterface.h
"
14
#include <optional>
15
16
namespace
lldb_private
{
17
class
ScriptedThreadPythonInterface
:
public
ScriptedThreadInterface
,
18
public
ScriptedPythonInterface
,
19
virtual
public
PluginInterface
{
20
public
:
21
ScriptedThreadPythonInterface
(
ScriptInterpreterPythonImpl
&interpreter);
22
23
llvm::Expected<StructuredData::GenericSP>
24
CreatePluginObject
(
const
ScriptedMetadata
&scripted_metadata,
25
ExecutionContext
&exe_ctx,
26
StructuredData::Generic
*script_obj =
nullptr
)
override
;
27
28
llvm::SmallVector<AbstractMethodRequirement>
29
GetAbstractMethodRequirements
()
const override
{
30
return
llvm::SmallVector<AbstractMethodRequirement>(
31
{{
"get_stop_reason"
}, {
"get_register_context"
}});
32
}
33
34
lldb::tid_t
GetThreadID
()
override
;
35
36
std::optional<std::string>
GetName
()
override
;
37
38
lldb::StateType
GetState
()
override
;
39
40
std::optional<std::string>
GetQueue
()
override
;
41
42
StructuredData::DictionarySP
GetStopReason
()
override
;
43
44
StructuredData::ArraySP
GetStackFrames
()
override
;
45
46
StructuredData::DictionarySP
GetRegisterInfo
()
override
;
47
48
std::optional<std::string>
GetRegisterContext
()
override
;
49
50
StructuredData::ArraySP
GetExtendedInfo
()
override
;
51
52
std::optional<std::string>
GetScriptedFramePluginName
()
override
;
53
54
static
void
Initialize
();
55
56
static
void
Terminate
();
57
58
static
llvm::StringRef
GetPluginNameStatic
() {
59
return
"ScriptedThreadPythonInterface"
;
60
}
61
62
llvm::StringRef
GetPluginName
()
override
{
return
GetPluginNameStatic
(); }
63
64
protected
:
65
lldb::ScriptedFrameInterfaceSP
CreateScriptedFrameInterface
()
override
;
66
};
67
}
// namespace lldb_private
68
69
#endif
// LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPYTHONINTERFACE_H
ScriptedPythonInterface.h
ScriptedThreadInterface.h
lldb_private::ExecutionContext
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
Definition
ExecutionContext.h:294
lldb_private::PluginInterface::PluginInterface
PluginInterface()=default
lldb_private::ScriptInterpreterPythonImpl
Definition
ScriptInterpreterPythonImpl.h:25
lldb_private::ScriptedMetadata
Definition
ScriptedMetadata.h:18
lldb_private::ScriptedPythonInterface::ScriptedPythonInterface
ScriptedPythonInterface(ScriptInterpreterPythonImpl &interpreter)
Definition
ScriptedPythonInterface.cpp:25
lldb_private::ScriptedThreadInterface
Definition
ScriptedThreadInterface.h:21
lldb_private::ScriptedThreadPythonInterface::Terminate
static void Terminate()
Definition
ScriptedThreadPythonInterface.cpp:169
lldb_private::ScriptedThreadPythonInterface::GetPluginName
llvm::StringRef GetPluginName() override
Definition
ScriptedThreadPythonInterface.h:62
lldb_private::ScriptedThreadPythonInterface::GetQueue
std::optional< std::string > GetQueue() override
Definition
ScriptedThreadPythonInterface.cpp:75
lldb_private::ScriptedThreadPythonInterface::GetScriptedFramePluginName
std::optional< std::string > GetScriptedFramePluginName() override
Definition
ScriptedThreadPythonInterface.cpp:146
lldb_private::ScriptedThreadPythonInterface::GetStopReason
StructuredData::DictionarySP GetStopReason() override
Definition
ScriptedThreadPythonInterface.cpp:86
lldb_private::ScriptedThreadPythonInterface::GetAbstractMethodRequirements
llvm::SmallVector< AbstractMethodRequirement > GetAbstractMethodRequirements() const override
Definition
ScriptedThreadPythonInterface.h:29
lldb_private::ScriptedThreadPythonInterface::GetThreadID
lldb::tid_t GetThreadID() override
Definition
ScriptedThreadPythonInterface.cpp:42
lldb_private::ScriptedThreadPythonInterface::GetState
lldb::StateType GetState() override
Definition
ScriptedThreadPythonInterface.cpp:64
lldb_private::ScriptedThreadPythonInterface::GetRegisterInfo
StructuredData::DictionarySP GetRegisterInfo() override
Definition
ScriptedThreadPythonInterface.cpp:110
lldb_private::ScriptedThreadPythonInterface::GetRegisterContext
std::optional< std::string > GetRegisterContext() override
Definition
ScriptedThreadPythonInterface.cpp:122
lldb_private::ScriptedThreadPythonInterface::GetPluginNameStatic
static llvm::StringRef GetPluginNameStatic()
Definition
ScriptedThreadPythonInterface.h:58
lldb_private::ScriptedThreadPythonInterface::ScriptedThreadPythonInterface
ScriptedThreadPythonInterface(ScriptInterpreterPythonImpl &interpreter)
Definition
ScriptedThreadPythonInterface.cpp:27
lldb_private::ScriptedThreadPythonInterface::GetStackFrames
StructuredData::ArraySP GetStackFrames() override
Definition
ScriptedThreadPythonInterface.cpp:98
lldb_private::ScriptedThreadPythonInterface::Initialize
static void Initialize()
Definition
ScriptedThreadPythonInterface.cpp:162
lldb_private::ScriptedThreadPythonInterface::CreatePluginObject
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(const ScriptedMetadata &scripted_metadata, ExecutionContext &exe_ctx, StructuredData::Generic *script_obj=nullptr) override
Definition
ScriptedThreadPythonInterface.cpp:32
lldb_private::ScriptedThreadPythonInterface::CreateScriptedFrameInterface
lldb::ScriptedFrameInterfaceSP CreateScriptedFrameInterface() override
Definition
ScriptedThreadPythonInterface.cpp:158
lldb_private::ScriptedThreadPythonInterface::GetExtendedInfo
StructuredData::ArraySP GetExtendedInfo() override
Definition
ScriptedThreadPythonInterface.cpp:133
lldb_private::ScriptedThreadPythonInterface::GetName
std::optional< std::string > GetName() override
Definition
ScriptedThreadPythonInterface.cpp:53
lldb_private::StructuredData::Generic
Definition
StructuredData.h:558
lldb_private::StructuredData::DictionarySP
std::shared_ptr< Dictionary > DictionarySP
Definition
StructuredData.h:73
lldb_private::StructuredData::ArraySP
std::shared_ptr< Array > ArraySP
Definition
StructuredData.h:67
lldb_private
A class that represents a running process on the host machine.
Definition
SBAddressRange.h:14
lldb::StateType
StateType
Process and Thread States.
Definition
lldb-enumerations.h:74
lldb::tid_t
uint64_t tid_t
Definition
lldb-types.h:84
lldb::ScriptedFrameInterfaceSP
std::shared_ptr< lldb_private::ScriptedFrameInterface > ScriptedFrameInterfaceSP
Definition
lldb-forward.h:423
Generated on
for LLDB by
1.14.0