|
LLDB mainline
|
#include <SBPlatform.h>
Public Member Functions | |
| SBPlatform () | |
| SBPlatform (const char *platform_name) | |
| SBPlatform (const SBPlatform &rhs) | |
| SBPlatform & | operator= (const SBPlatform &rhs) |
| ~SBPlatform () | |
| operator bool () const | |
| bool | IsValid () const |
| bool | IsHost () const |
| Returns true if this platform is the host platform, otherwise false. | |
| 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 |
Definition at line 96 of file SBPlatform.h.
| SBPlatform::SBPlatform | ( | ) |
Definition at line 294 of file SBPlatform.cpp.
References LLDB_INSTRUMENT_VA.
Referenced by GetHostPlatform(), operator=(), SBPlatform(), and ~SBPlatform().
| 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::SBPlatform | ( | const SBPlatform & | rhs | ) |
Definition at line 302 of file SBPlatform.cpp.
References LLDB_INSTRUMENT_VA, m_opaque_sp, and SBPlatform().
|
default |
References Attach(), Clear(), ConnectRemote(), DisconnectRemote(), error(), Get(), GetAllProcesses(), GetEnvironment(), GetFilePermissions(), GetHostname(), GetHostPlatform(), GetOSBuild(), GetOSDescription(), GetOSMajorVersion(), GetOSMinorVersion(), GetOSUpdateVersion(), GetTriple(), GetUnixSignals(), GetWorkingDirectory(), Install(), IsConnected(), IsHost(), IsValid(), Kill(), Launch(), MakeDirectory(), Put(), Run(), SBDebugger, SBPlatform(), SBTarget, SetFilePermissions(), SetLocateModuleCallback(), SetSDKRoot(), and SetWorkingDirectory().
| SBProcess SBPlatform::Attach | ( | SBAttachInfo & | attach_info, |
| const SBDebugger & | debugger, | ||
| SBTarget & | target, | ||
| SBError & | error ) |
Definition at line 577 of file SBPlatform.cpp.
References error(), lldb_private::Status::FromErrorString(), GetSP(), lldb::SBTarget::GetSP(), LLDB_INSTRUMENT_VA, lldb::SBAttachInfo::ref(), lldb::SBDebugger::ref(), SBDebugger, lldb::SBProcess, and SBTarget.
Referenced by ~SBPlatform().
| void SBPlatform::Clear | ( | ) |
Definition at line 340 of file SBPlatform.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
Referenced by ~SBPlatform().
| SBError SBPlatform::ConnectRemote | ( | SBPlatformConnectOptions & | connect_options | ) |
Definition at line 385 of file SBPlatform.cpp.
References lldb_private::Args::AppendArgument(), lldb_private::Status::FromErrorString(), GetSP(), lldb::SBPlatformConnectOptions::GetURL(), LLDB_INSTRUMENT_VA, and lldb::SBError::ref().
Referenced by ~SBPlatform().
| void SBPlatform::DisconnectRemote | ( | ) |
Definition at line 400 of file SBPlatform.cpp.
References GetSP(), and LLDB_INSTRUMENT_VA.
Referenced by ~SBPlatform().
|
protected |
Definition at line 621 of file SBPlatform.cpp.
References lldb_private::Status::FromErrorString(), GetSP(), and lldb::SBError::ref().
Referenced by Install(), Kill(), Launch(), Put(), Run(), and SBTarget.
| SBError SBPlatform::Get | ( | SBFileSpec & | src, |
| SBFileSpec & | dst ) |
Definition at line 498 of file SBPlatform.cpp.
References lldb_private::Status::FromErrorString(), GetSP(), LLDB_INSTRUMENT_VA, lldb::SBError::ref(), and lldb::SBFileSpec::ref().
Referenced by ~SBPlatform().
| SBProcessInfoList SBPlatform::GetAllProcesses | ( | SBError & | error | ) |
Definition at line 600 of file SBPlatform.cpp.
References error(), lldb_private::Status::FromErrorString(), GetSP(), and lldb::SBProcessInfoList.
Referenced by ~SBPlatform().
| SBEnvironment SBPlatform::GetEnvironment | ( | ) |
Return the environment variables of the remote platform connection process.
Definition at line 686 of file SBPlatform.cpp.
References GetSP(), LLDB_INSTRUMENT_VA, and lldb::SBEnvironment.
Referenced by ~SBPlatform().
| uint32_t SBPlatform::GetFilePermissions | ( | const char * | path | ) |
Definition at line 650 of file SBPlatform.cpp.
References GetSP(), and LLDB_INSTRUMENT_VA.
Referenced by ~SBPlatform().
| const char * SBPlatform::GetHostname | ( | ) |
Definition at line 456 of file SBPlatform.cpp.
References GetSP(), lldb_private::StringPool::GetSystemPool(), lldb_private::StringPoolRef::Intern(), and LLDB_INSTRUMENT_VA.
Referenced by ~SBPlatform().
|
static |
Definition at line 317 of file SBPlatform.cpp.
References lldb_private::Platform::GetHostPlatform(), LLDB_INSTRUMENT, m_opaque_sp, and SBPlatform().
Referenced by ~SBPlatform().
| const char * SBPlatform::GetName | ( | ) |
Definition at line 346 of file SBPlatform.cpp.
References GetSP(), lldb_private::StringPool::GetSystemPool(), lldb_private::StringPoolRef::InternNonEmpty(), and LLDB_INSTRUMENT_VA.
Referenced by lldb::SBDebugger::GetSelectedPlatform(), and lldb::SBDebugger::SetSelectedPlatform().
| const char * SBPlatform::GetOSBuild | ( | ) |
Definition at line 430 of file SBPlatform.cpp.
References GetSP(), lldb_private::StringPool::GetSystemPool(), lldb_private::StringPoolRef::Intern(), and LLDB_INSTRUMENT_VA.
Referenced by ~SBPlatform().
| const char * SBPlatform::GetOSDescription | ( | ) |
Definition at line 443 of file SBPlatform.cpp.
References GetSP(), lldb_private::StringPool::GetSystemPool(), lldb_private::StringPoolRef::Intern(), and LLDB_INSTRUMENT_VA.
Referenced by ~SBPlatform().
| uint32_t SBPlatform::GetOSMajorVersion | ( | ) |
Definition at line 465 of file SBPlatform.cpp.
References GetSP(), LLDB_INSTRUMENT_VA, and UINT32_MAX.
Referenced by ~SBPlatform().
| uint32_t SBPlatform::GetOSMinorVersion | ( | ) |
Definition at line 474 of file SBPlatform.cpp.
References GetSP(), LLDB_INSTRUMENT_VA, and UINT32_MAX.
Referenced by ~SBPlatform().
| uint32_t SBPlatform::GetOSUpdateVersion | ( | ) |
Definition at line 483 of file SBPlatform.cpp.
References GetSP(), LLDB_INSTRUMENT_VA, and UINT32_MAX.
Referenced by ~SBPlatform().
|
protected |
Definition at line 355 of file SBPlatform.cpp.
References m_opaque_sp.
Referenced by Attach(), ConnectRemote(), DisconnectRemote(), ExecuteConnected(), Get(), GetAllProcesses(), GetEnvironment(), GetFilePermissions(), GetHostname(), GetName(), GetOSBuild(), GetOSDescription(), GetOSMajorVersion(), GetOSMinorVersion(), GetOSUpdateVersion(), lldb::SBDebugger::GetSelectedPlatform(), GetTriple(), GetUnixSignals(), GetWorkingDirectory(), IsConnected(), MakeDirectory(), SBTarget, SetFilePermissions(), SetLocateModuleCallback(), SetSDKRoot(), lldb::SBDebugger::SetSelectedPlatform(), and SetWorkingDirectory().
| const char * SBPlatform::GetTriple | ( | ) |
Definition at line 417 of file SBPlatform.cpp.
References GetSP(), lldb_private::StringPool::GetSystemPool(), lldb_private::ArchSpec::GetTriple(), lldb_private::StringPoolRef::Intern(), lldb_private::ArchSpec::IsValid(), and LLDB_INSTRUMENT_VA.
Referenced by ~SBPlatform().
| SBUnixSignals SBPlatform::GetUnixSignals | ( | ) | const |
Definition at line 677 of file SBPlatform.cpp.
References GetSP(), LLDB_INSTRUMENT_VA, and lldb::SBUnixSignals.
Referenced by ~SBPlatform().
| const char * SBPlatform::GetWorkingDirectory | ( | ) |
Definition at line 361 of file SBPlatform.cpp.
References GetSP(), lldb_private::StringPool::GetSystemPool(), lldb_private::StringPoolRef::InternNonEmpty(), and LLDB_INSTRUMENT_VA.
Referenced by ~SBPlatform().
| SBError SBPlatform::Install | ( | SBFileSpec & | src, |
| SBFileSpec & | dst ) |
Definition at line 531 of file SBPlatform.cpp.
References error(), ExecuteConnected(), lldb::SBFileSpec::Exists(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::FileSpec::GetPath(), LLDB_INSTRUMENT_VA, and lldb::SBFileSpec::ref().
Referenced by ~SBPlatform().
| bool SBPlatform::IsConnected | ( | ) |
Definition at line 408 of file SBPlatform.cpp.
References GetSP(), and LLDB_INSTRUMENT_VA.
Referenced by ~SBPlatform().
| bool SBPlatform::IsHost | ( | ) | const |
Returns true if this platform is the host platform, otherwise false.
Definition at line 335 of file SBPlatform.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
Referenced by ~SBPlatform().
| bool SBPlatform::IsValid | ( | ) | const |
Definition at line 325 of file SBPlatform.cpp.
References LLDB_INSTRUMENT_VA.
Referenced by ~SBPlatform().
| 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().
| SBError SBPlatform::Launch | ( | SBLaunchInfo & | launch_info | ) |
Definition at line 567 of file SBPlatform.cpp.
References error(), ExecuteConnected(), LLDB_INSTRUMENT_VA, lldb::SBLaunchInfo::ref(), and lldb::SBLaunchInfo::set_ref().
Referenced by ~SBPlatform().
| SBError SBPlatform::MakeDirectory | ( | const char * | path, |
| uint32_t | file_permissions = eFilePermissionsDirectoryDefault ) |
Definition at line 636 of file SBPlatform.cpp.
References lldb_private::Status::FromErrorString(), GetSP(), LLDB_INSTRUMENT_VA, and lldb::SBError::ref().
Referenced by ~SBPlatform().
|
explicit |
Definition at line 329 of file SBPlatform.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
| SBPlatform & SBPlatform::operator= | ( | const SBPlatform & | rhs | ) |
Definition at line 308 of file SBPlatform.cpp.
References LLDB_INSTRUMENT_VA, m_opaque_sp, and SBPlatform().
| SBError SBPlatform::Put | ( | SBFileSpec & | src, |
| SBFileSpec & | dst ) |
Definition at line 511 of file SBPlatform.cpp.
References ExecuteConnected(), lldb::SBFileSpec::Exists(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::FileSpec::GetPath(), lldb_private::FileSystem::GetPermissions(), lldb_private::FileSystem::Instance(), LLDB_INSTRUMENT_VA, and lldb::SBFileSpec::ref().
Referenced by ~SBPlatform().
| SBError SBPlatform::Run | ( | SBPlatformShellCommand & | shell_command | ) |
Definition at line 544 of file SBPlatform.cpp.
References ExecuteConnected(), lldb_private::Status::FromErrorString(), lldb::SBPlatformShellCommand::GetCommand(), lldb::SBPlatformShellCommand::GetWorkingDirectory(), LLDB_INSTRUMENT_VA, lldb::SBPlatformShellCommand::m_opaque_ptr, PlatformShellCommand::m_output, PlatformShellCommand::m_shell, PlatformShellCommand::m_signo, PlatformShellCommand::m_status, PlatformShellCommand::m_timeout, and lldb::SBPlatformShellCommand::SetWorkingDirectory().
Referenced by ~SBPlatform().
| SBError SBPlatform::SetFilePermissions | ( | const char * | path, |
| uint32_t | file_permissions ) |
Definition at line 662 of file SBPlatform.cpp.
References lldb_private::Status::FromErrorString(), GetSP(), LLDB_INSTRUMENT_VA, and lldb::SBError::ref().
Referenced by ~SBPlatform().
| 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().
| void SBPlatform::SetSDKRoot | ( | const char * | sysroot | ) |
Definition at line 492 of file SBPlatform.cpp.
References GetSP(), and LLDB_INSTRUMENT_VA.
Referenced by ~SBPlatform().
|
protected |
Definition at line 357 of file SBPlatform.cpp.
References m_opaque_sp.
Referenced by lldb::SBDebugger::GetPlatformAtIndex(), lldb::SBDebugger::GetSelectedPlatform(), and SBTarget.
| bool SBPlatform::SetWorkingDirectory | ( | const char * | path | ) |
Definition at line 371 of file SBPlatform.cpp.
References GetSP(), and LLDB_INSTRUMENT_VA.
Referenced by ~SBPlatform().
|
friend |
Definition at line 196 of file SBPlatform.h.
References SBDebugger.
Referenced by Attach(), SBDebugger, and ~SBPlatform().
|
friend |
Definition at line 197 of file SBPlatform.h.
References ExecuteConnected(), GetSP(), SBTarget, and SetSP().
Referenced by Attach(), SBTarget, and ~SBPlatform().
|
protected |
Definition at line 207 of file SBPlatform.h.
Referenced by Clear(), GetHostPlatform(), lldb::SBTarget::GetPlatform(), GetSP(), IsHost(), operator bool(), operator=(), SBPlatform(), SBPlatform(), and SetSP().