LLDB
mainline
llvm-project
lldb
source
Plugins
ScriptInterpreter
Python
Interfaces
ScriptedPlatformPythonInterface.h
Go to the documentation of this file.
1
//===-- ScriptedPlatformPythonInterface.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_SCRIPTEDPLATFORMPYTHONINTERFACE_H
10
#define LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPLATFORMPYTHONINTERFACE_H
11
12
#include "
lldb/Interpreter/Interfaces/ScriptedPlatformInterface.h
"
13
14
#include "
ScriptedPythonInterface.h
"
15
16
namespace
lldb_private
{
17
class
ScriptedPlatformPythonInterface
:
public
ScriptedPlatformInterface
,
18
public
ScriptedPythonInterface
,
19
public
PluginInterface
{
20
public
:
21
ScriptedPlatformPythonInterface
(
ScriptInterpreterPythonImpl
&interpreter);
22
23
llvm::Expected<StructuredData::GenericSP>
24
CreatePluginObject
(
const
llvm::StringRef class_name,
25
ExecutionContext
&exe_ctx,
26
StructuredData::DictionarySP
args_sp,
27
StructuredData::Generic
*script_obj =
nullptr
)
override
;
28
29
llvm::SmallVector<AbstractMethodRequirement>
30
GetAbstractMethodRequirements
()
const override
{
31
return
llvm::SmallVector<AbstractMethodRequirement>(
32
{{
"list_processes"
},
33
{
"attach_to_process"
, 2},
34
{
"launch_process"
, 2},
35
{
"kill_process"
, 2}});
36
}
37
38
StructuredData::DictionarySP
ListProcesses
()
override
;
39
40
StructuredData::DictionarySP
GetProcessInfo
(
lldb::pid_t
)
override
;
41
42
Status
AttachToProcess
(
lldb::ProcessAttachInfoSP
attach_info)
override
;
43
44
Status
LaunchProcess
(
lldb::ProcessLaunchInfoSP
launch_info)
override
;
45
46
Status
KillProcess
(
lldb::pid_t
pid)
override
;
47
48
static
void
Initialize
();
49
50
static
void
Terminate
();
51
52
static
llvm::StringRef
GetPluginNameStatic
() {
53
return
"ScriptedPlatformPythonInterface"
;
54
}
55
56
llvm::StringRef
GetPluginName
()
override
{
return
GetPluginNameStatic
(); }
57
};
58
}
// namespace lldb_private
59
60
#endif
// LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPLATFORMPYTHONINTERFACE_H
ScriptedPlatformInterface.h
ScriptedPythonInterface.h
lldb_private::ExecutionContext
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
Definition
ExecutionContext.h:317
lldb_private::PluginInterface::PluginInterface
PluginInterface()=default
lldb_private::ScriptInterpreterPythonImpl
Definition
ScriptInterpreterPythonImpl.h:25
lldb_private::ScriptedPlatformInterface
Definition
ScriptedPlatformInterface.h:20
lldb_private::ScriptedPlatformPythonInterface::GetPluginName
llvm::StringRef GetPluginName() override
Definition
ScriptedPlatformPythonInterface.h:56
lldb_private::ScriptedPlatformPythonInterface::GetProcessInfo
StructuredData::DictionarySP GetProcessInfo(lldb::pid_t) override
Definition
ScriptedPlatformPythonInterface.cpp:62
lldb_private::ScriptedPlatformPythonInterface::GetPluginNameStatic
static llvm::StringRef GetPluginNameStatic()
Definition
ScriptedPlatformPythonInterface.h:52
lldb_private::ScriptedPlatformPythonInterface::CreatePluginObject
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(const llvm::StringRef class_name, ExecutionContext &exe_ctx, StructuredData::DictionarySP args_sp, StructuredData::Generic *script_obj=nullptr) override
Definition
ScriptedPlatformPythonInterface.cpp:34
lldb_private::ScriptedPlatformPythonInterface::KillProcess
Status KillProcess(lldb::pid_t pid) override
Definition
ScriptedPlatformPythonInterface.cpp:91
lldb_private::ScriptedPlatformPythonInterface::LaunchProcess
Status LaunchProcess(lldb::ProcessLaunchInfoSP launch_info) override
Definition
ScriptedPlatformPythonInterface.cpp:85
lldb_private::ScriptedPlatformPythonInterface::Terminate
static void Terminate()
Definition
ScriptedPlatformPythonInterface.cpp:101
lldb_private::ScriptedPlatformPythonInterface::GetAbstractMethodRequirements
llvm::SmallVector< AbstractMethodRequirement > GetAbstractMethodRequirements() const override
Definition
ScriptedPlatformPythonInterface.h:30
lldb_private::ScriptedPlatformPythonInterface::ListProcesses
StructuredData::DictionarySP ListProcesses() override
Definition
ScriptedPlatformPythonInterface.cpp:44
lldb_private::ScriptedPlatformPythonInterface::ScriptedPlatformPythonInterface
ScriptedPlatformPythonInterface(ScriptInterpreterPythonImpl &interpreter)
Definition
ScriptedPlatformPythonInterface.cpp:29
lldb_private::ScriptedPlatformPythonInterface::Initialize
static void Initialize()
Definition
ScriptedPlatformPythonInterface.cpp:95
lldb_private::ScriptedPlatformPythonInterface::AttachToProcess
Status AttachToProcess(lldb::ProcessAttachInfoSP attach_info) override
Definition
ScriptedPlatformPythonInterface.cpp:79
lldb_private::ScriptedPythonInterface::ScriptedPythonInterface
ScriptedPythonInterface(ScriptInterpreterPythonImpl &interpreter)
Definition
ScriptedPythonInterface.cpp:25
lldb_private::Status
An error handling class.
Definition
Status.h:118
lldb_private::StructuredData::Generic
Definition
StructuredData.h:558
lldb_private::StructuredData::DictionarySP
std::shared_ptr< Dictionary > DictionarySP
Definition
StructuredData.h:73
lldb_private
A class that represents a running process on the host machine.
Definition
SBAddressRange.h:14
lldb::ProcessAttachInfoSP
std::shared_ptr< lldb_private::ProcessAttachInfo > ProcessAttachInfoSP
Definition
lldb-forward.h:397
lldb::pid_t
uint64_t pid_t
Definition
lldb-types.h:83
lldb::ProcessLaunchInfoSP
std::shared_ptr< lldb_private::ProcessLaunchInfo > ProcessLaunchInfoSP
Definition
lldb-forward.h:398
Generated on
for LLDB by
1.14.0