LLDB
mainline
llvm-project
lldb
source
Plugins
ScriptInterpreter
Python
Interfaces
OperatingSystemPythonInterface.h
Go to the documentation of this file.
1
//===-- OperatingSystemPythonInterface.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_OPERATINGSYSTEMPYTHONINTERFACE_H
10
#define LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_OPERATINGSYSTEMPYTHONINTERFACE_H
11
12
#include "
lldb/Interpreter/Interfaces/OperatingSystemInterface.h
"
13
14
#include "
ScriptedThreadPythonInterface.h
"
15
16
#include <optional>
17
18
namespace
lldb_private
{
19
class
OperatingSystemPythonInterface
20
:
virtual
public
OperatingSystemInterface
,
21
virtual
public
ScriptedThreadPythonInterface
,
22
public
PluginInterface
{
23
public
:
24
OperatingSystemPythonInterface
(
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_thread_info"
}});
34
}
35
36
StructuredData::DictionarySP
CreateThread
(
lldb::tid_t
tid,
37
lldb::addr_t
context)
override
;
38
39
StructuredData::ArraySP
GetThreadInfo
()
override
;
40
41
StructuredData::DictionarySP
GetRegisterInfo
()
override
;
42
43
std::optional<std::string>
GetRegisterContextForTID
(
lldb::tid_t
tid)
override
;
44
45
std::optional<bool>
DoesPluginReportAllThreads
()
override
;
46
47
static
void
Initialize
();
48
49
static
void
Terminate
();
50
51
static
llvm::StringRef
GetPluginNameStatic
() {
52
return
"OperatingSystemPythonInterface"
;
53
}
54
55
llvm::StringRef
GetPluginName
()
override
{
return
GetPluginNameStatic
(); }
56
};
57
}
// namespace lldb_private
58
59
#endif
// LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_OPERATINGSYSTEMPYTHONINTERFACE_H
OperatingSystemInterface.h
ScriptedThreadPythonInterface.h
lldb_private::ExecutionContext
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
Definition
ExecutionContext.h:317
lldb_private::OperatingSystemInterface
Definition
OperatingSystemInterface.h:18
lldb_private::OperatingSystemPythonInterface::CreatePluginObject
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(llvm::StringRef class_name, ExecutionContext &exe_ctx, StructuredData::DictionarySP args_sp, StructuredData::Generic *script_obj=nullptr) override
Definition
OperatingSystemPythonInterface.cpp:33
lldb_private::OperatingSystemPythonInterface::GetRegisterInfo
StructuredData::DictionarySP GetRegisterInfo() override
Definition
OperatingSystemPythonInterface.cpp:66
lldb_private::OperatingSystemPythonInterface::GetPluginName
llvm::StringRef GetPluginName() override
Definition
OperatingSystemPythonInterface.h:55
lldb_private::OperatingSystemPythonInterface::GetThreadInfo
StructuredData::ArraySP GetThreadInfo() override
Definition
OperatingSystemPythonInterface.cpp:54
lldb_private::OperatingSystemPythonInterface::GetRegisterContextForTID
std::optional< std::string > GetRegisterContextForTID(lldb::tid_t tid) override
Definition
OperatingSystemPythonInterface.cpp:71
lldb_private::OperatingSystemPythonInterface::DoesPluginReportAllThreads
std::optional< bool > DoesPluginReportAllThreads() override
Definition
OperatingSystemPythonInterface.cpp:82
lldb_private::OperatingSystemPythonInterface::OperatingSystemPythonInterface
OperatingSystemPythonInterface(ScriptInterpreterPythonImpl &interpreter)
Definition
OperatingSystemPythonInterface.cpp:28
lldb_private::OperatingSystemPythonInterface::Initialize
static void Initialize()
Definition
OperatingSystemPythonInterface.cpp:92
lldb_private::OperatingSystemPythonInterface::GetPluginNameStatic
static llvm::StringRef GetPluginNameStatic()
Definition
OperatingSystemPythonInterface.h:51
lldb_private::OperatingSystemPythonInterface::Terminate
static void Terminate()
Definition
OperatingSystemPythonInterface.cpp:102
lldb_private::OperatingSystemPythonInterface::GetAbstractMethodRequirements
llvm::SmallVector< AbstractMethodRequirement > GetAbstractMethodRequirements() const override
Definition
OperatingSystemPythonInterface.h:32
lldb_private::OperatingSystemPythonInterface::CreateThread
StructuredData::DictionarySP CreateThread(lldb::tid_t tid, lldb::addr_t context) override
Definition
OperatingSystemPythonInterface.cpp:41
lldb_private::PluginInterface::PluginInterface
PluginInterface()=default
lldb_private::ScriptInterpreterPythonImpl
Definition
ScriptInterpreterPythonImpl.h:25
lldb_private::ScriptedThreadPythonInterface::ScriptedThreadPythonInterface
ScriptedThreadPythonInterface(ScriptInterpreterPythonImpl &interpreter)
Definition
ScriptedThreadPythonInterface.cpp:27
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::addr_t
uint64_t addr_t
Definition
lldb-types.h:80
lldb::tid_t
uint64_t tid_t
Definition
lldb-types.h:84
Generated on
for LLDB by
1.14.0