LLDB mainline
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 293 of file SBPlatform.cpp.

References LLDB_INSTRUMENT_VA.

Referenced by GetHostPlatform(), operator=(), SBPlatform(), and ~SBPlatform().

◆ SBPlatform() [2/3]

SBPlatform::SBPlatform ( const char * platform_name)

Definition at line 295 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 301 of file SBPlatform.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_sp, and SBPlatform().

◆ ~SBPlatform()

Member Function Documentation

◆ Attach()

◆ Clear()

void SBPlatform::Clear ( )

Definition at line 334 of file SBPlatform.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by ~SBPlatform().

◆ ConnectRemote()

◆ DisconnectRemote()

void SBPlatform::DisconnectRemote ( )

Definition at line 393 of file SBPlatform.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

Referenced by ~SBPlatform().

◆ ExecuteConnected()

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

◆ Get()

◆ GetAllProcesses()

SBProcessInfoList SBPlatform::GetAllProcesses ( SBError & error)

◆ 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 686 of file SBPlatform.cpp.

References GetSP(), LLDB_INSTRUMENT_VA, and lldb::SBEnvironment.

Referenced by ~SBPlatform().

◆ GetFilePermissions()

uint32_t SBPlatform::GetFilePermissions ( const char * path)

Definition at line 650 of file SBPlatform.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

Referenced by ~SBPlatform().

◆ GetHostname()

const char * SBPlatform::GetHostname ( )

Definition at line 455 of file SBPlatform.cpp.

References lldb_private::ConstString::GetCString(), GetSP(), and LLDB_INSTRUMENT_VA.

Referenced by ~SBPlatform().

◆ GetHostPlatform()

SBPlatform SBPlatform::GetHostPlatform ( )
static

◆ GetName()

const char * SBPlatform::GetName ( )

◆ GetOSBuild()

const char * SBPlatform::GetOSBuild ( )

Definition at line 425 of file SBPlatform.cpp.

References lldb_private::ConstString::GetCString(), GetSP(), and LLDB_INSTRUMENT_VA.

Referenced by ~SBPlatform().

◆ GetOSDescription()

const char * SBPlatform::GetOSDescription ( )

Definition at line 440 of file SBPlatform.cpp.

References lldb_private::ConstString::GetCString(), GetSP(), and LLDB_INSTRUMENT_VA.

Referenced by ~SBPlatform().

◆ GetOSMajorVersion()

uint32_t SBPlatform::GetOSMajorVersion ( )

Definition at line 464 of file SBPlatform.cpp.

References GetSP(), LLDB_INSTRUMENT_VA, and UINT32_MAX.

Referenced by ~SBPlatform().

◆ GetOSMinorVersion()

uint32_t SBPlatform::GetOSMinorVersion ( )

Definition at line 473 of file SBPlatform.cpp.

References GetSP(), LLDB_INSTRUMENT_VA, and UINT32_MAX.

Referenced by ~SBPlatform().

◆ GetOSUpdateVersion()

uint32_t SBPlatform::GetOSUpdateVersion ( )

Definition at line 482 of file SBPlatform.cpp.

References GetSP(), LLDB_INSTRUMENT_VA, and UINT32_MAX.

Referenced by ~SBPlatform().

◆ GetSP()

◆ GetTriple()

const char * SBPlatform::GetTriple ( )

◆ GetUnixSignals()

SBUnixSignals SBPlatform::GetUnixSignals ( ) const

Definition at line 677 of file SBPlatform.cpp.

References GetSP(), LLDB_INSTRUMENT_VA, and lldb::SBUnixSignals.

Referenced by ~SBPlatform().

◆ GetWorkingDirectory()

const char * SBPlatform::GetWorkingDirectory ( )

Definition at line 355 of file SBPlatform.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

Referenced by ~SBPlatform().

◆ Install()

◆ IsConnected()

bool SBPlatform::IsConnected ( )

Definition at line 401 of file SBPlatform.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

Referenced by ~SBPlatform().

◆ IsValid()

bool SBPlatform::IsValid ( ) const

Definition at line 324 of file SBPlatform.cpp.

References LLDB_INSTRUMENT_VA.

Referenced by ~SBPlatform().

◆ Kill()

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

Definition at line 614 of file SBPlatform.cpp.

References ExecuteConnected(), and LLDB_INSTRUMENT_VA.

Referenced by ~SBPlatform().

◆ 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 328 of file SBPlatform.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ operator=()

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

Definition at line 307 of file SBPlatform.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_sp, and SBPlatform().

◆ Put()

◆ Run()

◆ 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 697 of file SBPlatform.cpp.

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

Referenced by ~SBPlatform().

◆ SetSDKRoot()

void SBPlatform::SetSDKRoot ( const char * sysroot)

Definition at line 491 of file SBPlatform.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

Referenced by ~SBPlatform().

◆ SetSP()

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

◆ SetWorkingDirectory()

bool SBPlatform::SetWorkingDirectory ( const char * path)

Definition at line 364 of file SBPlatform.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

Referenced by ~SBPlatform().

◆ SBDebugger

friend class SBDebugger
friend

Definition at line 194 of file SBPlatform.h.

References SBDebugger.

Referenced by Attach(), SBDebugger, and ~SBPlatform().

◆ SBTarget

friend class SBTarget
friend

Definition at line 195 of file SBPlatform.h.

References ExecuteConnected(), GetSP(), SBTarget, and SetSP().

Referenced by Attach(), SBTarget, and ~SBPlatform().

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: