LLDB mainline
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
lldb::SBPlatform Class Reference

#include <SBPlatform.h>

Public Member Functions

 SBPlatform ()
 
 SBPlatform (const char *platform_name)
 
 SBPlatform (const SBPlatform &rhs)
 
SBPlatformoperator= (const SBPlatform &rhs)
 
 ~SBPlatform ()
 
 operator bool () const
 
bool IsValid () const
 
void Clear ()
 
const char * GetWorkingDirectory ()
 
bool SetWorkingDirectory (const char *path)
 
const char * GetName ()
 
SBError ConnectRemote (SBPlatformConnectOptions &connect_options)
 
void DisconnectRemote ()
 
bool IsConnected ()
 
const char * GetTriple ()
 
const char * GetHostname ()
 
const char * GetOSBuild ()
 
const char * GetOSDescription ()
 
uint32_t GetOSMajorVersion ()
 
uint32_t GetOSMinorVersion ()
 
uint32_t GetOSUpdateVersion ()
 
void SetSDKRoot (const char *sysroot)
 
SBError Put (SBFileSpec &src, SBFileSpec &dst)
 
SBError Get (SBFileSpec &src, SBFileSpec &dst)
 
SBError Install (SBFileSpec &src, SBFileSpec &dst)
 
SBError Run (SBPlatformShellCommand &shell_command)
 
SBError Launch (SBLaunchInfo &launch_info)
 
SBProcess Attach (SBAttachInfo &attach_info, const SBDebugger &debugger, SBTarget &target, SBError &error)
 
SBProcessInfoList GetAllProcesses (SBError &error)
 
SBError Kill (const lldb::pid_t pid)
 
SBError MakeDirectory (const char *path, uint32_t file_permissions=eFilePermissionsDirectoryDefault)
 
uint32_t GetFilePermissions (const char *path)
 
SBError SetFilePermissions (const char *path, uint32_t file_permissions)
 
SBUnixSignals GetUnixSignals () const
 
SBEnvironment GetEnvironment ()
 Return the environment variables of the remote platform connection process.
 
SBError SetLocateModuleCallback (lldb::SBPlatformLocateModuleCallback callback, void *callback_baton)
 Set a callback as an implementation for locating module in order to implement own module cache system.
 

Static Public Member Functions

static SBPlatform GetHostPlatform ()
 

Protected Member Functions

lldb::PlatformSP GetSP () const
 
void SetSP (const lldb::PlatformSP &platform_sp)
 
SBError ExecuteConnected (const std::function< lldb_private::Status(const lldb::PlatformSP &)> &func)
 

Protected Attributes

lldb::PlatformSP m_opaque_sp
 

Friends

class SBDebugger
 
class SBTarget
 

Detailed Description

Definition at line 97 of file SBPlatform.h.

Constructor & Destructor Documentation

◆ SBPlatform() [1/3]

SBPlatform::SBPlatform ( )

Definition at line 294 of file SBPlatform.cpp.

References LLDB_INSTRUMENT_VA.

◆ SBPlatform() [2/3]

SBPlatform::SBPlatform ( const char *  platform_name)

Definition at line 296 of file SBPlatform.cpp.

References lldb_private::Platform::Create(), LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SBPlatform() [3/3]

SBPlatform::SBPlatform ( const SBPlatform rhs)

Definition at line 302 of file SBPlatform.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ ~SBPlatform()

SBPlatform::~SBPlatform ( )
default

Member Function Documentation

◆ Attach()

SBProcess SBPlatform::Attach ( SBAttachInfo attach_info,
const SBDebugger debugger,
SBTarget target,
SBError error 
)

◆ Clear()

void SBPlatform::Clear ( )

Definition at line 335 of file SBPlatform.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ ConnectRemote()

SBError SBPlatform::ConnectRemote ( SBPlatformConnectOptions connect_options)

◆ DisconnectRemote()

void SBPlatform::DisconnectRemote ( )

Definition at line 394 of file SBPlatform.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

◆ ExecuteConnected()

SBError SBPlatform::ExecuteConnected ( const std::function< lldb_private::Status(const lldb::PlatformSP &)> &  func)
protected

Definition at line 624 of file SBPlatform.cpp.

References GetSP(), lldb::SBError::ref(), and lldb::SBError::SetErrorString().

Referenced by Install(), Kill(), Launch(), Put(), and Run().

◆ Get()

SBError SBPlatform::Get ( SBFileSpec src,
SBFileSpec dst 
)

◆ GetAllProcesses()

SBProcessInfoList SBPlatform::GetAllProcesses ( SBError error)

Definition at line 603 of file SBPlatform.cpp.

References error(), and GetSP().

◆ GetEnvironment()

SBEnvironment SBPlatform::GetEnvironment ( )

Return the environment variables of the remote platform connection process.

Returns
An lldb::SBEnvironment object which is a copy of the platform's environment.

Definition at line 689 of file SBPlatform.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

◆ GetFilePermissions()

uint32_t SBPlatform::GetFilePermissions ( const char *  path)

Definition at line 653 of file SBPlatform.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

◆ GetHostname()

const char * SBPlatform::GetHostname ( )

◆ GetHostPlatform()

SBPlatform SBPlatform::GetHostPlatform ( )
static

◆ GetName()

const char * SBPlatform::GetName ( )

◆ GetOSBuild()

const char * SBPlatform::GetOSBuild ( )

◆ GetOSDescription()

const char * SBPlatform::GetOSDescription ( )

◆ GetOSMajorVersion()

uint32_t SBPlatform::GetOSMajorVersion ( )

Definition at line 465 of file SBPlatform.cpp.

References GetSP(), LLDB_INSTRUMENT_VA, and UINT32_MAX.

◆ GetOSMinorVersion()

uint32_t SBPlatform::GetOSMinorVersion ( )

Definition at line 474 of file SBPlatform.cpp.

References GetSP(), LLDB_INSTRUMENT_VA, and UINT32_MAX.

◆ GetOSUpdateVersion()

uint32_t SBPlatform::GetOSUpdateVersion ( )

Definition at line 483 of file SBPlatform.cpp.

References GetSP(), LLDB_INSTRUMENT_VA, and UINT32_MAX.

◆ GetSP()

lldb::PlatformSP SBPlatform::GetSP ( ) const
protected

◆ GetTriple()

const char * SBPlatform::GetTriple ( )

◆ GetUnixSignals()

SBUnixSignals SBPlatform::GetUnixSignals ( ) const

Definition at line 680 of file SBPlatform.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

◆ GetWorkingDirectory()

const char * SBPlatform::GetWorkingDirectory ( )

Definition at line 356 of file SBPlatform.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

◆ Install()

SBError SBPlatform::Install ( SBFileSpec src,
SBFileSpec dst 
)

◆ IsConnected()

bool SBPlatform::IsConnected ( )

Definition at line 402 of file SBPlatform.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

◆ IsValid()

bool SBPlatform::IsValid ( ) const

Definition at line 325 of file SBPlatform.cpp.

References LLDB_INSTRUMENT_VA.

◆ Kill()

SBError SBPlatform::Kill ( const lldb::pid_t  pid)

Definition at line 617 of file SBPlatform.cpp.

References ExecuteConnected(), and LLDB_INSTRUMENT_VA.

◆ Launch()

SBError SBPlatform::Launch ( SBLaunchInfo launch_info)

◆ MakeDirectory()

SBError SBPlatform::MakeDirectory ( const char *  path,
uint32_t  file_permissions = eFilePermissionsDirectoryDefault 
)

◆ operator bool()

SBPlatform::operator bool ( ) const
explicit

Definition at line 329 of file SBPlatform.cpp.

References LLDB_INSTRUMENT_VA.

◆ operator=()

SBPlatform & SBPlatform::operator= ( const SBPlatform rhs)

Definition at line 308 of file SBPlatform.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ Put()

SBError SBPlatform::Put ( SBFileSpec src,
SBFileSpec dst 
)

◆ Run()

SBError SBPlatform::Run ( SBPlatformShellCommand shell_command)

◆ SetFilePermissions()

SBError SBPlatform::SetFilePermissions ( const char *  path,
uint32_t  file_permissions 
)

◆ SetLocateModuleCallback()

SBError SBPlatform::SetLocateModuleCallback ( lldb::SBPlatformLocateModuleCallback  callback,
void *  callback_baton 
)

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.

Definition at line 700 of file SBPlatform.cpp.

References error(), GetSP(), LLDB_INSTRUMENT_VA, and lldb::SBFileSpec::ref().

◆ SetSDKRoot()

void SBPlatform::SetSDKRoot ( const char *  sysroot)

Definition at line 492 of file SBPlatform.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

◆ SetSP()

void SBPlatform::SetSP ( const lldb::PlatformSP platform_sp)
protected

◆ SetWorkingDirectory()

bool SBPlatform::SetWorkingDirectory ( const char *  path)

Definition at line 365 of file SBPlatform.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

Friends And Related Function Documentation

◆ SBDebugger

friend class SBDebugger
friend

Definition at line 194 of file SBPlatform.h.

◆ SBTarget

friend class SBTarget
friend

Definition at line 195 of file SBPlatform.h.

Member Data Documentation

◆ m_opaque_sp

lldb::PlatformSP lldb::SBPlatform::m_opaque_sp
protected

The documentation for this class was generated from the following files: