LLDB
mainline
llvm-project
lldb
include
lldb
Interpreter
Interfaces
ScriptedPlatformInterface.h
Go to the documentation of this file.
1
//===-- ScriptedPlatformInterface.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_INTERPRETER_INTERFACES_SCRIPTEDPLATFORMINTERFACE_H
10
#define LLDB_INTERPRETER_INTERFACES_SCRIPTEDPLATFORMINTERFACE_H
11
12
#include "
lldb/Core/StructuredDataImpl.h
"
13
#include "
lldb/Interpreter/Interfaces/ScriptedInterface.h
"
14
15
#include "
lldb/lldb-private.h
"
16
17
#include <string>
18
19
namespace
lldb_private
{
20
class
ScriptedPlatformInterface
:
virtual
public
ScriptedInterface
{
21
public
:
22
virtual
llvm::Expected<StructuredData::GenericSP>
23
CreatePluginObject
(llvm::StringRef class_name,
ExecutionContext
&exe_ctx,
24
StructuredData::DictionarySP
args_sp,
25
StructuredData::Generic
*script_obj =
nullptr
) = 0;
26
27
virtual
StructuredData::DictionarySP
ListProcesses
() {
return
{}; }
28
29
virtual
StructuredData::DictionarySP
GetProcessInfo
(
lldb::pid_t
) {
30
return
{};
31
}
32
33
virtual
Status
AttachToProcess
(
lldb::ProcessAttachInfoSP
attach_info) {
34
return
Status::FromErrorString
(
35
"ScriptedPlatformInterface cannot attach to a process"
);
36
}
37
38
virtual
Status
LaunchProcess
(
lldb::ProcessLaunchInfoSP
launch_info) {
39
return
Status::FromErrorString
(
40
"ScriptedPlatformInterface cannot launch process"
);
41
}
42
43
virtual
Status
KillProcess
(
lldb::pid_t
pid) {
44
return
Status::FromErrorString
(
45
"ScriptedPlatformInterface cannot kill process"
);
46
}
47
};
48
}
// namespace lldb_private
49
50
#endif
// LLDB_INTERPRETER_INTERFACES_SCRIPTEDPLATFORMINTERFACE_H
ScriptedInterface.h
StructuredDataImpl.h
lldb_private::ExecutionContext
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
Definition:
ExecutionContext.h:292
lldb_private::ScriptedInterface
Definition:
ScriptedInterface.h:25
lldb_private::ScriptedPlatformInterface
Definition:
ScriptedPlatformInterface.h:20
lldb_private::ScriptedPlatformInterface::LaunchProcess
virtual Status LaunchProcess(lldb::ProcessLaunchInfoSP launch_info)
Definition:
ScriptedPlatformInterface.h:38
lldb_private::ScriptedPlatformInterface::GetProcessInfo
virtual StructuredData::DictionarySP GetProcessInfo(lldb::pid_t)
Definition:
ScriptedPlatformInterface.h:29
lldb_private::ScriptedPlatformInterface::AttachToProcess
virtual Status AttachToProcess(lldb::ProcessAttachInfoSP attach_info)
Definition:
ScriptedPlatformInterface.h:33
lldb_private::ScriptedPlatformInterface::ListProcesses
virtual StructuredData::DictionarySP ListProcesses()
Definition:
ScriptedPlatformInterface.h:27
lldb_private::ScriptedPlatformInterface::KillProcess
virtual Status KillProcess(lldb::pid_t pid)
Definition:
ScriptedPlatformInterface.h:43
lldb_private::ScriptedPlatformInterface::CreatePluginObject
virtual llvm::Expected< StructuredData::GenericSP > CreatePluginObject(llvm::StringRef class_name, ExecutionContext &exe_ctx, StructuredData::DictionarySP args_sp, StructuredData::Generic *script_obj=nullptr)=0
lldb_private::Status
An error handling class.
Definition:
Status.h:118
lldb_private::Status::FromErrorString
static Status FromErrorString(const char *str)
Definition:
Status.h:141
lldb_private::StructuredData::Generic
Definition:
StructuredData.h:558
lldb_private::StructuredData::DictionarySP
std::shared_ptr< Dictionary > DictionarySP
Definition:
StructuredData.h:73
lldb-private.h
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:390
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:391
Generated on Sat Feb 1 2025 14:51:18 for LLDB by
1.9.6