SBPlatform#

class lldb.SBPlatform(*args)#

A class that represents a platform that can represent the current host or a remote host debug platform.

The SBPlatform class represents the current host, or a remote host. It can be connected to a remote platform in order to provide ways to remotely launch and attach to processes, upload/download files, create directories, run remote shell commands, find locally cached versions of files from the remote system, and much more.

SBPlatform objects can be created and then used to connect to a remote platform which allows the SBPlatform to be used to get a list of the current processes on the remote host, attach to one of those processes, install programs on the remote system, attach and launch processes, and much more.

Every SBTarget has a corresponding SBPlatform. The platform can be specified upon target creation, or the currently selected platform will attempt to be used when creating the target automatically as long as the currently selected platform matches the target architecture and executable type. If the architecture or executable type do not match, a suitable platform will be found automatically.

Methods Summary

Attach(SBPlatform self, ...)

Clear(SBPlatform self)

ConnectRemote(SBPlatform self, ...)

DisconnectRemote(SBPlatform self)

Get(SBPlatform self, SBFileSpec src, ...)

GetAllProcesses(SBPlatform self, SBError error)

GetEnvironment()

Return the environment variables of the remote platform connection process.

GetFilePermissions(SBPlatform self, ...)

GetHostPlatform()

GetHostname(SBPlatform self)

GetName(SBPlatform self)

GetOSBuild(SBPlatform self)

GetOSDescription(SBPlatform self)

GetOSMajorVersion(SBPlatform self)

GetOSMinorVersion(SBPlatform self)

GetOSUpdateVersion(SBPlatform self)

GetTriple(SBPlatform self)

GetUnixSignals(SBPlatform self)

GetWorkingDirectory(SBPlatform self)

Install(SBPlatform self, SBFileSpec src, ...)

IsConnected(SBPlatform self)

IsValid(SBPlatform self)

Kill(SBPlatform self, lldb)

Launch(SBPlatform self, SBLaunchInfo launch_info)

MakeDirectory(SBPlatform self, ...)

Put(SBPlatform self, SBFileSpec src, ...)

Run(SBPlatform self, ...)

SetFilePermissions(SBPlatform self, ...)

SetLocateModuleCallback(callback)

Set a callback as an implementation for locating module in order to implement own module cache system.

SetSDKRoot(SBPlatform self, char const * sysroot)

SetWorkingDirectory(SBPlatform self, ...)

Methods Documentation

Attach(SBPlatform self, SBAttachInfo attach_info, SBDebugger debugger, SBTarget target, SBError error) SBProcess#
Clear(SBPlatform self)#
ConnectRemote(SBPlatform self, SBPlatformConnectOptions connect_options) SBError#
DisconnectRemote(SBPlatform self)#
Get(SBPlatform self, SBFileSpec src, SBFileSpec dst) SBError#
GetAllProcesses(SBPlatform self, SBError error) SBProcessInfoList#
GetEnvironment()#

Return the environment variables of the remote platform connection process.

Return type:

SBEnvironment

Returns:

An lldb::SBEnvironment object which is a copy of the platformโ€™s environment.

GetFilePermissions(SBPlatform self, char const * path) uint32_t#
static GetHostPlatform() SBPlatform#
GetHostname(SBPlatform self) char const *#
GetName(SBPlatform self) char const *#
GetOSBuild(SBPlatform self) char const *#
GetOSDescription(SBPlatform self) char const *#
GetOSMajorVersion(SBPlatform self) uint32_t#
GetOSMinorVersion(SBPlatform self) uint32_t#
GetOSUpdateVersion(SBPlatform self) uint32_t#
GetTriple(SBPlatform self) char const *#
GetUnixSignals(SBPlatform self) SBUnixSignals#
GetWorkingDirectory(SBPlatform self) char const *#
Install(SBPlatform self, SBFileSpec src, SBFileSpec dst) SBError#
IsConnected(SBPlatform self) bool#
IsValid(SBPlatform self) bool#
Kill(SBPlatform self, lldb::pid_t const pid) SBError#
Launch(SBPlatform self, SBLaunchInfo launch_info) SBError#
MakeDirectory(SBPlatform self, char const * path, uint32_t file_permissions=eFilePermissionsDirectoryDefault) SBError#
Put(SBPlatform self, SBFileSpec src, SBFileSpec dst) SBError#
Run(SBPlatform self, SBPlatformShellCommand shell_command) SBError#
SetFilePermissions(SBPlatform self, char const * path, uint32_t file_permissions) SBError#
SetLocateModuleCallback(callback)#

Set a callback as an implementation for locating module in order to implement own module cache system. For example, to leverage distributed build system, to bypass pulling files from remote platform, or to search symbol files from symbol servers. The target will call this callback to get a module file and a symbol file, and it will fallback to the LLDB implementation when this callback failed or returned non-existent file. This callback can set either module_file_spec or symbol_file_spec, or both module_file_spec and symbol_file_spec. The callback will be cleared if nullptr or None is set.

SetSDKRoot(SBPlatform self, char const * sysroot)#
SetWorkingDirectory(SBPlatform self, char const * path) bool#