LLDB mainline
|
A plug-in interface definition class for debug platform that includes many platform abilities such as: More...
#include "lldb/Target/Platform.h"
Public Member Functions | |
Platform (bool is_host_platform) | |
Default Constructor. | |
~Platform () override | |
The destructor is virtual since this class is designed to be inherited from by the plug-in instance. | |
virtual Status | ResolveExecutable (const ModuleSpec &module_spec, lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr) |
Find a platform plugin for a given process. | |
virtual Status | ResolveSymbolFile (Target &target, const ModuleSpec &sym_spec, FileSpec &sym_file) |
Find a symbol file given a symbol file module specification. | |
virtual bool | ResolveRemotePath (const FileSpec &platform_path, FileSpec &resolved_platform_path) |
Resolves the FileSpec to a (possibly) remote path. | |
virtual llvm::VersionTuple | GetOSVersion (Process *process=nullptr) |
Get the OS version from a connected platform. | |
bool | SetOSVersion (llvm::VersionTuple os_version) |
std::optional< std::string > | GetOSBuildString () |
std::optional< std::string > | GetOSKernelDescription () |
llvm::StringRef | GetName () |
virtual const char * | GetHostname () |
virtual ConstString | GetFullNameForDylib (ConstString basename) |
virtual llvm::StringRef | GetDescription ()=0 |
virtual void | GetStatus (Stream &strm) |
Report the current status for this platform. | |
virtual bool | GetRemoteOSVersion () |
virtual std::optional< std::string > | GetRemoteOSBuildString () |
virtual std::optional< std::string > | GetRemoteOSKernelDescription () |
virtual ArchSpec | GetRemoteSystemArchitecture () |
virtual FileSpec | GetRemoteWorkingDirectory () |
virtual bool | SetRemoteWorkingDirectory (const FileSpec &working_dir) |
virtual UserIDResolver & | GetUserIDResolver () |
virtual Status | GetFileWithUUID (const FileSpec &platform_file, const UUID *uuid_ptr, FileSpec &local_file) |
Locate a file for a platform. | |
virtual FileSpecList | LocateExecutableScriptingResources (Target *target, Module &module, Stream *feedback_stream) |
virtual Status | GetSharedModule (const ModuleSpec &module_spec, Process *process, lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr, llvm::SmallVectorImpl< lldb::ModuleSP > *old_modules, bool *did_create_ptr) |
virtual bool | GetModuleSpec (const FileSpec &module_file_spec, const ArchSpec &arch, ModuleSpec &module_spec) |
virtual Status | ConnectRemote (Args &args) |
virtual Status | DisconnectRemote () |
virtual std::vector< ArchSpec > | GetSupportedArchitectures (const ArchSpec &process_host_arch)=0 |
Get the platform's supported architectures in the order in which they should be searched. | |
virtual size_t | GetSoftwareBreakpointTrapOpcode (Target &target, BreakpointSite *bp_site) |
virtual Status | LaunchProcess (ProcessLaunchInfo &launch_info) |
Launch a new process on a platform, not necessarily for debugging, it could be just for running the process. | |
virtual Status | ShellExpandArguments (ProcessLaunchInfo &launch_info) |
Perform expansion of the command-line for this launch info This can potentially involve wildcard expansion environment variable replacement, and whatever other argument magic the platform defines as part of its typical user experience. | |
virtual Status | KillProcess (const lldb::pid_t pid) |
Kill process on a platform. | |
virtual bool | IsCompatibleArchitecture (const ArchSpec &arch, const ArchSpec &process_host_arch, ArchSpec::MatchType match, ArchSpec *compatible_arch_ptr) |
Lets a platform answer if it is compatible with a given architecture and the target triple contained within. | |
virtual bool | CanDebugProcess () |
Not all platforms will support debugging a process by spawning somehow halted for a debugger (specified using the "eLaunchFlagDebug" launch flag) and then attaching. | |
virtual lldb::ProcessSP | DebugProcess (ProcessLaunchInfo &launch_info, Debugger &debugger, Target &target, Status &error) |
Subclasses do not need to implement this function as it uses the Platform::LaunchProcess() followed by Platform::Attach (). | |
virtual lldb::ProcessSP | ConnectProcess (llvm::StringRef connect_url, llvm::StringRef plugin_name, Debugger &debugger, Target *target, Status &error) |
virtual lldb::ProcessSP | ConnectProcessSynchronous (llvm::StringRef connect_url, llvm::StringRef plugin_name, Debugger &debugger, Stream &stream, Target *target, Status &error) |
virtual lldb::ProcessSP | Attach (ProcessAttachInfo &attach_info, Debugger &debugger, Target *target, Status &error)=0 |
Attach to an existing process using a process ID. | |
virtual uint32_t | FindProcesses (const ProcessInstanceInfoMatch &match_info, ProcessInstanceInfoList &proc_infos) |
Attach to an existing process by process name. | |
virtual bool | GetProcessInfo (lldb::pid_t pid, ProcessInstanceInfo &proc_info) |
virtual lldb::BreakpointSP | SetThreadCreationBreakpoint (Target &target) |
virtual lldb_private::ConstString | GetSDKDirectory (lldb_private::Target &target) |
const std::string & | GetRemoteURL () const |
bool | IsHost () const |
bool | IsRemote () const |
virtual bool | IsConnected () const |
const ArchSpec & | GetSystemArchitecture () |
void | SetSystemArchitecture (const ArchSpec &arch) |
ArchSpec | GetAugmentedArchSpec (llvm::StringRef triple) |
If the triple contains not specify the vendor, os, and environment parts, we "augment" these using information from the platform and return the resulting ArchSpec object. | |
size_t | GetMaxUserIDNameLength () const |
size_t | GetMaxGroupIDNameLength () const |
ConstString | GetSDKRootDirectory () const |
void | SetSDKRootDirectory (ConstString dir) |
ConstString | GetSDKBuild () const |
void | SetSDKBuild (ConstString sdk_build) |
virtual bool | SupportsModules () |
virtual void | AddClangModuleCompilationOptions (Target *target, std::vector< std::string > &options) |
FileSpec | GetWorkingDirectory () |
bool | SetWorkingDirectory (const FileSpec &working_dir) |
virtual bool | ModuleIsExcludedForUnconstrainedSearches (Target &target, const lldb::ModuleSP &module_sp) |
virtual Status | MakeDirectory (const FileSpec &file_spec, uint32_t permissions) |
virtual Status | GetFilePermissions (const FileSpec &file_spec, uint32_t &file_permissions) |
virtual Status | SetFilePermissions (const FileSpec &file_spec, uint32_t file_permissions) |
virtual lldb::user_id_t | OpenFile (const FileSpec &file_spec, File::OpenOptions flags, uint32_t mode, Status &error) |
virtual bool | CloseFile (lldb::user_id_t fd, Status &error) |
virtual lldb::user_id_t | GetFileSize (const FileSpec &file_spec) |
virtual void | AutoCompleteDiskFileOrDirectory (CompletionRequest &request, bool only_dir) |
virtual uint64_t | ReadFile (lldb::user_id_t fd, uint64_t offset, void *dst, uint64_t dst_len, Status &error) |
virtual uint64_t | WriteFile (lldb::user_id_t fd, uint64_t offset, const void *src, uint64_t src_len, Status &error) |
virtual Status | GetFile (const FileSpec &source, const FileSpec &destination) |
virtual Status | PutFile (const FileSpec &source, const FileSpec &destination, uint32_t uid=UINT32_MAX, uint32_t gid=UINT32_MAX) |
virtual Status | CreateSymlink (const FileSpec &src, const FileSpec &dst) |
virtual Status | Install (const FileSpec &src, const FileSpec &dst) |
Install a file or directory to the remote system. | |
virtual Environment | GetEnvironment () |
virtual bool | GetFileExists (const lldb_private::FileSpec &file_spec) |
virtual Status | Unlink (const FileSpec &file_spec) |
virtual MmapArgList | GetMmapArgumentList (const ArchSpec &arch, lldb::addr_t addr, lldb::addr_t length, unsigned prot, unsigned flags, lldb::addr_t fd, lldb::addr_t offset) |
virtual bool | GetSupportsRSync () |
virtual void | SetSupportsRSync (bool flag) |
virtual const char * | GetRSyncOpts () |
virtual void | SetRSyncOpts (const char *opts) |
virtual const char * | GetRSyncPrefix () |
virtual void | SetRSyncPrefix (const char *prefix) |
virtual bool | GetSupportsSSH () |
virtual void | SetSupportsSSH (bool flag) |
virtual const char * | GetSSHOpts () |
virtual void | SetSSHOpts (const char *opts) |
virtual bool | GetIgnoresRemoteHostname () |
virtual void | SetIgnoresRemoteHostname (bool flag) |
virtual lldb_private::OptionGroupOptions * | GetConnectionOptions (CommandInterpreter &interpreter) |
virtual lldb_private::Status | RunShellCommand (llvm::StringRef command, const FileSpec &working_dir, int *status_ptr, int *signo_ptr, std::string *command_output, const Timeout< std::micro > &timeout) |
virtual lldb_private::Status | RunShellCommand (llvm::StringRef shell, llvm::StringRef command, const FileSpec &working_dir, int *status_ptr, int *signo_ptr, std::string *command_output, const Timeout< std::micro > &timeout) |
virtual void | SetLocalCacheDirectory (const char *local) |
virtual const char * | GetLocalCacheDirectory () |
virtual std::string | GetPlatformSpecificConnectionInformation () |
virtual bool | CalculateMD5 (const FileSpec &file_spec, uint64_t &low, uint64_t &high) |
virtual uint32_t | GetResumeCountForLaunchInfo (ProcessLaunchInfo &launch_info) |
virtual const lldb::UnixSignalsSP & | GetRemoteUnixSignals () |
lldb::UnixSignalsSP | GetUnixSignals () |
virtual std::string | GetQueueNameForThreadQAddress (Process *process, lldb::addr_t dispatch_qaddr) |
Locate a queue name given a thread's qaddr. | |
virtual lldb::queue_id_t | GetQueueIDForThreadQAddress (Process *process, lldb::addr_t dispatch_qaddr) |
Locate a queue ID given a thread's qaddr. | |
virtual const std::vector< ConstString > & | GetTrapHandlerSymbolNames () |
Provide a list of trap handler function names for this platform. | |
virtual lldb::UnwindPlanSP | GetTrapHandlerUnwindPlan (const llvm::Triple &triple, ConstString name) |
Try to get a specific unwind plan for a named trap handler. | |
virtual FileSpec | LocateExecutable (const char *basename) |
Find a support executable that may not live within in the standard locations related to LLDB. | |
virtual uint32_t | GetDefaultMemoryCacheLineSize () |
Allow the platform to set preferred memory cache line size. | |
uint32_t | LoadImage (lldb_private::Process *process, const lldb_private::FileSpec &local_file, const lldb_private::FileSpec &remote_file, lldb_private::Status &error) |
Load a shared library into this process. | |
uint32_t | LoadImageUsingPaths (lldb_private::Process *process, const lldb_private::FileSpec &library_name, const std::vector< std::string > &paths, lldb_private::Status &error, lldb_private::FileSpec *loaded_path) |
Load a shared library specified by base name into this process, looking by hand along a set of paths. | |
virtual uint32_t | DoLoadImage (lldb_private::Process *process, const lldb_private::FileSpec &remote_file, const std::vector< std::string > *paths, lldb_private::Status &error, lldb_private::FileSpec *loaded_path=nullptr) |
virtual Status | UnloadImage (lldb_private::Process *process, uint32_t image_token) |
virtual size_t | ConnectToWaitingProcesses (lldb_private::Debugger &debugger, lldb_private::Status &error) |
Connect to all processes waiting for a debugger to attach. | |
virtual llvm::Expected< StructuredData::DictionarySP > | FetchExtendedCrashInformation (lldb_private::Process &process) |
Gather all of crash informations into a structured data dictionary. | |
virtual bool | LoadPlatformBinaryAndSetup (Process *process, lldb::addr_t addr, bool notify) |
Detect a binary in memory that will determine which Platform and DynamicLoader should be used in this target/process, and update the Platform/DynamicLoader. | |
virtual CompilerType | GetSiginfoType (const llvm::Triple &triple) |
virtual Args | GetExtraStartupCommands () |
![]() | |
PluginInterface ()=default | |
virtual | ~PluginInterface ()=default |
virtual llvm::StringRef | GetPluginName ()=0 |
PluginInterface (const PluginInterface &)=delete | |
PluginInterface & | operator= (const PluginInterface &)=delete |
Static Public Member Functions | |
static void | Initialize () |
static void | Terminate () |
static PlatformProperties & | GetGlobalPlatformProperties () |
static lldb::PlatformSP | GetHostPlatform () |
Get the native host platform plug-in. | |
static const char * | GetHostPlatformName () |
static void | SetHostPlatform (const lldb::PlatformSP &platform_sp) |
static lldb::PlatformSP | Create (llvm::StringRef name) |
static ArchSpec | GetAugmentedArchSpec (Platform *platform, llvm::StringRef triple) |
Augments the triple either with information from platform or the host system (if platform is null). | |
Protected Types | |
typedef std::map< uint32_t, ConstString > | IDToNameMap |
Protected Member Functions | |
lldb::ProcessSP | DoConnectProcess (llvm::StringRef connect_url, llvm::StringRef plugin_name, Debugger &debugger, Stream *stream, Target *target, Status &error) |
Private implementation of connecting to a process. | |
virtual void | CalculateTrapHandlerSymbolNames ()=0 |
Ask the Platform subclass to fill in the list of trap handler names. | |
Status | GetCachedExecutable (ModuleSpec &module_spec, lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr) |
virtual Status | DownloadModuleSlice (const FileSpec &src_file_spec, const uint64_t src_offset, const uint64_t src_size, const FileSpec &dst_file_spec) |
virtual Status | DownloadSymbolFile (const lldb::ModuleSP &module_sp, const FileSpec &dst_file_spec) |
virtual const char * | GetCacheHostname () |
virtual Status | ResolveRemoteExecutable (const ModuleSpec &module_spec, lldb::ModuleSP &exe_module_sp, const FileSpecList *module_search_paths_ptr) |
Static Protected Member Functions | |
static std::vector< ArchSpec > | CreateArchList (llvm::ArrayRef< llvm::Triple::ArchType > archs, llvm::Triple::OSType os) |
Create a list of ArchSpecs with the given OS and a architectures. | |
Protected Attributes | |
bool | m_is_host |
bool | m_os_version_set_while_connected |
bool | m_system_arch_set_while_connected |
ConstString | m_sdk_sysroot |
ConstString | m_sdk_build |
FileSpec | m_working_dir |
std::string | m_remote_url |
std::string | m_hostname |
llvm::VersionTuple | m_os_version |
ArchSpec | m_system_arch |
std::mutex | m_mutex |
size_t | m_max_uid_name_len |
size_t | m_max_gid_name_len |
bool | m_supports_rsync |
std::string | m_rsync_opts |
std::string | m_rsync_prefix |
bool | m_supports_ssh |
std::string | m_ssh_opts |
bool | m_ignores_remote_hostname |
std::string | m_local_cache_directory |
std::vector< ConstString > | m_trap_handlers |
bool | m_calculated_trap_handlers |
const std::unique_ptr< ModuleCache > | m_module_cache |
Private Types | |
typedef std::function< Status(const ModuleSpec &)> | ModuleResolver |
Private Member Functions | |
Status | GetRemoteSharedModule (const ModuleSpec &module_spec, Process *process, lldb::ModuleSP &module_sp, const ModuleResolver &module_resolver, bool *did_create_ptr) |
bool | GetCachedSharedModule (const ModuleSpec &module_spec, lldb::ModuleSP &module_sp, bool *did_create_ptr) |
FileSpec | GetModuleCacheRoot () |
A plug-in interface definition class for debug platform that includes many platform abilities such as:
Definition at line 72 of file Platform.h.
|
protected |
Definition at line 913 of file Platform.h.
|
private |
Definition at line 962 of file Platform.h.
Platform::Platform | ( | bool | is_host_platform | ) |
Default Constructor.
Definition at line 270 of file Platform.cpp.
References lldb_private::GetLog(), LLDB_LOGF, and lldb_private::Object.
|
overridedefault |
The destructor is virtual since this class is designed to be inherited from by the plug-in instance.
|
virtual |
Reimplemented in lldb_private::PlatformAppleSimulator, lldb_private::PlatformMacOSX, and lldb_private::PlatformRemoteDarwinDevice.
Definition at line 387 of file Platform.cpp.
|
pure virtual |
Attach to an existing process using a process ID.
Each platform subclass needs to implement this function and attempt to attach to the process with the process ID of pid. The platform subclass should return an appropriate ProcessSP subclass that is attached to the process, or an empty shared pointer with an appropriate error.
Implemented in PlatformPOSIX, lldb_private::PlatformWindows, lldb_private::platform_gdb_server::PlatformRemoteGDBServer, and lldb_private::PlatformQemuUser.
Referenced by DebugProcess().
|
inlinevirtual |
Reimplemented in lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 500 of file Platform.h.
|
virtual |
Reimplemented in lldb_private::RemoteAwarePlatform.
Definition at line 1310 of file Platform.cpp.
References lldb_private::FileSpec::GetPath(), and IsHost().
Referenced by lldb_private::RemoteAwarePlatform::CalculateMD5().
|
protectedpure virtual |
Ask the Platform subclass to fill in the list of trap handler names.
For most Unix user process environments, this will be a single function name, _sigtramp. More specialized environments may have additional handler names. The unwinder code needs to know when a trap handler is on the stack because the unwind rules for the frame that caused the trap are different.
The base class Platform ivar m_trap_handlers should be updated by the Platform subclass when this method is called. If there are no predefined trap handlers, this method may be a no-op.
Implemented in lldb_private::platform_freebsd::PlatformFreeBSD, lldb_private::platform_gdb_server::PlatformRemoteGDBServer, lldb_private::platform_linux::PlatformLinux, lldb_private::PlatformDarwin, lldb_private::platform_netbsd::PlatformNetBSD, lldb_private::platform_openbsd::PlatformOpenBSD, PlatformPOSIX, lldb_private::PlatformQemuUser, and lldb_private::PlatformWindows.
Referenced by GetTrapHandlerSymbolNames().
|
inlinevirtual |
Not all platforms will support debugging a process by spawning somehow halted for a debugger (specified using the "eLaunchFlagDebug" launch flag) and then attaching.
If your platform doesn't support this, override this function and return false.
Reimplemented in lldb_private::platform_freebsd::PlatformFreeBSD, lldb_private::platform_linux::PlatformLinux, lldb_private::platform_netbsd::PlatformNetBSD, lldb_private::platform_openbsd::PlatformOpenBSD, and lldb_private::PlatformWindows.
Definition at line 340 of file Platform.h.
|
virtual |
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 682 of file Platform.cpp.
References lldb_private::FileCache::CloseFile(), error(), lldb_private::FileCache::GetInstance(), and IsHost().
Referenced by lldb_private::RemoteAwarePlatform::CloseFile(), DownloadModuleSlice(), and PutFile().
|
virtual |
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::platform_android::PlatformAndroidRemoteGDBServer.
Definition at line 1752 of file Platform.cpp.
References DoConnectProcess(), and error().
Referenced by lldb_private::RemoteAwarePlatform::ConnectProcess(), and lldb_private::platform_gdb_server::PlatformRemoteGDBServer::ConnectToWaitingProcesses().
|
virtual |
Definition at line 1760 of file Platform.cpp.
References DoConnectProcess(), and error().
Reimplemented in lldb_private::platform_android::PlatformAndroid, lldb_private::platform_android::PlatformAndroidRemoteGDBServer, lldb_private::platform_gdb_server::PlatformRemoteGDBServer, lldb_private::PlatformAppleSimulator, PlatformPOSIX, and lldb_private::PlatformWindows.
Definition at line 948 of file Platform.cpp.
References error(), lldb_private::PluginInterface::GetPluginName(), and IsHost().
|
virtual |
Connect to all processes waiting for a debugger to attach.
If the platform have a list of processes waiting for a debugger to connect to them then connect to all of these pending processes.
[in] | debugger | The debugger used for the connect. |
[out] | error | If an error occurred during the connect then this object will contain the error message. |
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 1824 of file Platform.cpp.
References error().
Referenced by lldb_private::RemoteAwarePlatform::ConnectToWaitingProcesses().
|
static |
Definition at line 252 of file Platform.cpp.
References GetHostPlatform(), GetHostPlatformName(), and lldb_private::PluginManager::GetPlatformCreateCallbackForPluginName().
Referenced by lldb_private::PlatformList::Create(), and lldb::SBPlatform::SBPlatform().
|
staticprotected |
Create a list of ArchSpecs with the given OS and a architectures.
The vendor field is left as an "unspecified unknown".
Definition at line 1143 of file Platform.cpp.
Referenced by lldb_private::platform_freebsd::PlatformFreeBSD::PlatformFreeBSD(), lldb_private::platform_linux::PlatformLinux::PlatformLinux(), lldb_private::platform_netbsd::PlatformNetBSD::PlatformNetBSD(), and lldb_private::platform_openbsd::PlatformOpenBSD::PlatformOpenBSD().
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 1244 of file Platform.cpp.
References lldb_private::FileSystem::Instance(), IsHost(), and lldb_private::FileSystem::Symlink().
Referenced by lldb_private::RemoteAwarePlatform::CreateSymlink(), Install(), and RecurseCopy_Callback().
|
virtual |
Subclasses do not need to implement this function as it uses the Platform::LaunchProcess() followed by Platform::Attach ().
Remote platforms will want to subclass this function in order to be able to intercept STDIO and possibly launch a separate process that will debug the debuggee.
Reimplemented in PlatformPOSIX, lldb_private::PlatformWindows, lldb_private::platform_gdb_server::PlatformRemoteGDBServer, lldb_private::PlatformAppleSimulator, lldb_private::PlatformDarwin, and lldb_private::PlatformQemuUser.
Definition at line 1060 of file Platform.cpp.
References Attach(), error(), lldb_private::ProcessLaunchInfo::GetFlags(), lldb_private::ProcessInfo::GetHijackListener(), lldb_private::GetLog(), lldb_private::ProcessInfo::GetProcessID(), lldb_private::ProcessLaunchInfo::GetPTY(), lldb_private::PluginManager::GetStructuredDataFilterCallbackAtIndex(), lldb_private::PseudoTerminal::invalid_fd, LaunchProcess(), LLDB_INVALID_PROCESS_ID, LLDB_LOG, LLDB_LOGF, lldb_private::Platform, lldb_private::PseudoTerminal::ReleasePrimaryFileDescriptor(), lldb_private::Flags::Set(), lldb_private::ProcessInfo::SetHijackListener(), and lldb_private::ProcessLaunchInfo::SetLaunchInSeparateProcessGroup().
Referenced by lldb_private::PlatformDarwin::DebugProcess().
|
virtual |
Reimplemented in lldb_private::platform_android::PlatformAndroid, lldb_private::platform_android::PlatformAndroidRemoteGDBServer, lldb_private::platform_gdb_server::PlatformRemoteGDBServer, lldb_private::PlatformAppleSimulator, PlatformPOSIX, and lldb_private::PlatformWindows.
Definition at line 961 of file Platform.cpp.
References error(), lldb_private::PluginInterface::GetPluginName(), and IsHost().
|
protected |
Private implementation of connecting to a process.
If the stream is set we connect synchronously.
Definition at line 1767 of file Platform.cpp.
References lldb_private::Target::CreateProcess(), lldb_private::TargetList::CreateTarget(), lldb_private::eLoadDependentsNo, error(), lldb_private::Target::GetDefaultArchitecture(), lldb_private::Debugger::GetListener(), lldb_private::Debugger::GetTargetList(), lldb_private::ArchSpec::GetTriple(), lldb_private::Process::HandleProcessStateChangedEvent(), lldb_private::ArchSpec::IsValid(), lldb_private::Listener::MakeListener(), and SelectMostRelevantFrame.
Referenced by ConnectProcess(), and ConnectProcessSynchronous().
|
virtual |
Reimplemented in PlatformPOSIX, and lldb_private::PlatformWindows.
Definition at line 1721 of file Platform.cpp.
References error(), and LLDB_INVALID_IMAGE_TOKEN.
Referenced by LoadImage(), and LoadImageUsingPaths().
|
protectedvirtual |
Reimplemented in lldb_private::platform_android::PlatformAndroid.
Definition at line 1611 of file Platform.cpp.
References CloseFile(), lldb_private::File::eOpenOptionReadOnly, error(), lldb_private::FileSpec::GetPath(), OpenFile(), and ReadFile().
Referenced by GetCachedSharedModule().
|
protectedvirtual |
Reimplemented in lldb_private::platform_android::PlatformAndroid.
Definition at line 1659 of file Platform.cpp.
Referenced by GetCachedSharedModule().
|
inlinevirtual |
Gather all of crash informations into a structured data dictionary.
If the platform have a crashed process with crash information entries, gather all the entries into an structured data dictionary or return a nullptr. This dictionary is generic and extensible, as it contains an array for each different type of crash information.
[in] | process | The crashed process. |
Reimplemented in lldb_private::PlatformDarwin.
Definition at line 846 of file Platform.h.
|
virtual |
Attach to an existing process by process name.
This function is not meant to be overridden by Process subclasses. It will first call Process::WillAttach (const char *) and if that returns true, Process::DoAttach (const char *) will be called to actually do the attach. If DoAttach returns true, then Process::DidAttach() will be called.
[in] | process_name | A process name to match against the current process list. |
Reimplemented in lldb_private::PlatformQemuUser, lldb_private::RemoteAwarePlatform, lldb_private::platform_gdb_server::PlatformRemoteGDBServer, and lldb_private::PlatformAppleSimulator.
Definition at line 984 of file Platform.cpp.
References lldb_private::Host::FindProcesses(), and IsHost().
Referenced by lldb_private::RemoteAwarePlatform::FindProcesses().
ArchSpec Platform::GetAugmentedArchSpec | ( | llvm::StringRef | triple | ) |
If the triple contains not specify the vendor, os, and environment parts, we "augment" these using information from the platform and return the resulting ArchSpec object.
Definition at line 919 of file Platform.cpp.
References lldb_private::ArchSpec::CompatibleMatch, lldb_private::ArchSpec::ContainsOnlyArch(), lldb_private::ArchSpec::GetTriple(), IsCompatibleArchitecture(), and lldb_private::ArchSpec::IsValid().
Augments the triple either with information from platform or the host system (if platform is null).
Definition at line 263 of file Platform.cpp.
References GetAugmentedArchSpec().
Referenced by lldb::SBTarget::AddModule(), lldb::SBDebugger::CreateTargetWithFileAndArch(), lldb::SBDebugger::FindTargetWithFileAndArch(), lldb_private::OptionGroupArchitecture::GetArchitecture(), GetAugmentedArchSpec(), lldb_private::CommandObjectDisassemble::CommandOptions::SetOptionValue(), CommandObjectPlatformProcessList::CommandOptions::SetOptionValue(), and lldb_private::CommandOptionsProcessLaunch::SetOptionValue().
|
protected |
Definition at line 1484 of file Platform.cpp.
References error(), lldb_private::ModuleSpec::GetFileSpec(), lldb_private::ModuleSpec::GetPlatformFileSpec(), GetRemoteSharedModule(), and ResolveRemoteExecutable().
Referenced by lldb_private::RemoteAwarePlatform::ResolveExecutable().
|
private |
Definition at line 1578 of file Platform.cpp.
References DownloadModuleSlice(), DownloadSymbolFile(), error(), lldb_private::UUID::GetAsString(), GetCacheHostname(), lldb_private::ModuleSpec::GetFileSpec(), GetGlobalPlatformProperties(), lldb_private::GetLog(), GetModuleCacheRoot(), lldb_private::ModuleSpec::GetObjectOffset(), lldb_private::ModuleSpec::GetObjectSize(), lldb_private::ModuleSpec::GetUUID(), IsHost(), LLDB_LOGF, m_module_cache, and lldb_private::Platform.
Referenced by GetRemoteSharedModule().
|
protectedvirtual |
Reimplemented in lldb_private::platform_android::PlatformAndroid.
Definition at line 1671 of file Platform.cpp.
References GetHostname().
Referenced by GetCachedSharedModule().
|
inlinevirtual |
Reimplemented in PlatformPOSIX.
Definition at line 583 of file Platform.h.
|
inlinevirtual |
Allow the platform to set preferred memory cache line size.
If non-zero (and the user has not set cache line size explicitly), this value will be used as the cache line size for memory reads.
Reimplemented in lldb_private::platform_android::PlatformAndroid.
Definition at line 730 of file Platform.h.
|
pure virtual |
Implemented in lldb_private::platform_freebsd::PlatformFreeBSD, lldb_private::platform_gdb_server::PlatformRemoteGDBServer, lldb_private::platform_linux::PlatformLinux, lldb_private::PlatformAppleSimulator, lldb_private::PlatformMacOSX, lldb_private::PlatformRemoteAppleBridge, lldb_private::PlatformRemoteAppleTV, lldb_private::PlatformRemoteAppleWatch, lldb_private::PlatformRemoteiOS, lldb_private::PlatformRemoteMacOSX, lldb_private::platform_netbsd::PlatformNetBSD, lldb_private::platform_openbsd::PlatformOpenBSD, lldb_private::PlatformQemuUser, and lldb_private::PlatformWindows.
|
virtual |
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::PlatformQemuUser.
Definition at line 1466 of file Platform.cpp.
References lldb_private::Host::GetEnvironment(), and IsHost().
Referenced by lldb_private::RemoteAwarePlatform::GetEnvironment().
|
virtual |
Reimplemented in lldb_private::PlatformDarwin.
Definition at line 1971 of file Platform.cpp.
Reimplemented in lldb_private::platform_android::PlatformAndroid, lldb_private::PlatformMacOSX, and PlatformPOSIX.
Definition at line 1238 of file Platform.cpp.
References error().
Referenced by BringInRemoteFile(), lldb_private::PlatformMacOSX::GetFile(), PlatformPOSIX::GetFile(), and lldb_private::process_gdb_remote::ProcessGDBRemote::SaveCore().
|
virtual |
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 1252 of file Platform.cpp.
References lldb_private::FileSystem::Exists(), lldb_private::FileSystem::Instance(), and IsHost().
Referenced by lldb_private::RemoteAwarePlatform::GetFileExists().
|
virtual |
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 646 of file Platform.cpp.
References error(), lldb_private::FileSpec::GetPath(), lldb_private::PluginInterface::GetPluginName(), and IsHost().
Referenced by lldb_private::RemoteAwarePlatform::GetFilePermissions().
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 688 of file Platform.cpp.
References lldb_private::FileSpec::GetPath(), IsHost(), and UINT64_MAX.
Referenced by lldb_private::RemoteAwarePlatform::GetFileSize().
|
virtual |
Locate a file for a platform.
The default implementation of this function will return the same file patch in local_file as was in platform_file.
[in] | platform_file | The platform file path to locate and cache locally. |
[in] | uuid_ptr | If we know the exact UUID of the file we are looking for, it can be specified. If it is not specified, we might now know the exact file. The UUID is usually some sort of MD5 checksum for the file and is sometimes known by dynamic linkers/loaders. If the UUID is known, it is best to supply it to platform file queries to ensure we are finding the correct file, not just a file at the correct path. |
[out] | local_file | A locally cached version of the platform file. For platforms that describe the current host computer, this will just be the same file. For remote platforms, this file might come from and SDK directory, or might need to be sync'ed over to the current machine for efficient debugging access. |
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 152 of file Platform.cpp.
|
virtual |
Reimplemented in lldb_private::PlatformDarwin, lldb_private::PlatformWindows, and PlatformPOSIX.
Definition at line 733 of file Platform.cpp.
|
static |
Definition at line 141 of file Platform.cpp.
Referenced by lldb_private::Debugger::Debugger(), GetCachedSharedModule(), and GetModuleCacheRoot().
|
virtual |
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 724 of file Platform.cpp.
References IsHost(), and m_hostname.
Referenced by GetCacheHostname(), lldb_private::RemoteAwarePlatform::GetHostname(), and GetStatus().
|
static |
Get the native host platform plug-in.
There should only be one of these for each host that LLDB runs upon that should be statically compiled in and registered using preprocessor macros or other similar build mechanisms in a PlatformSubclass::Initialize() function.
This platform will be used as the default platform when launching or attaching to processes unless another platform is specified.
There should only be one of these for each host that LLDB runs upon that should be statically compiled in and registered using preprocessor macros or other similar build mechanisms.
This platform will be used as the default platform when launching or attaching to processes unless another platform is specified.
Definition at line 135 of file Platform.cpp.
References GetHostPlatformSP().
Referenced by Create(), lldb_private::Debugger::Debugger(), CommandObjectPlatformList::DoExecute(), CommandObjectPlatformShell::DoExecute(), lldb::SBDebugger::GetAvailablePlatformInfoAtIndex(), lldb::SBPlatform::GetHostPlatform(), and lldb_private::PlatformQemuUser::GetMmapArgumentList().
|
static |
Definition at line 62 of file Platform.cpp.
Referenced by Create(), lldb_private::PlatformMacOSX::GetPluginNameStatic(), lldb_private::platform_android::PlatformAndroid::GetPluginNameStatic(), lldb_private::platform_freebsd::PlatformFreeBSD::GetPluginNameStatic(), lldb_private::platform_linux::PlatformLinux::GetPluginNameStatic(), lldb_private::platform_netbsd::PlatformNetBSD::GetPluginNameStatic(), lldb_private::platform_openbsd::PlatformOpenBSD::GetPluginNameStatic(), and lldb_private::PlatformWindows::GetPluginNameStatic().
|
inlinevirtual |
Definition at line 576 of file Platform.h.
References m_ignores_remote_hostname.
Referenced by PlatformPOSIX::GetFile(), PlatformPOSIX::GetPlatformSpecificConnectionInformation(), and PlatformPOSIX::PutFile().
|
virtual |
Definition at line 1325 of file Platform.cpp.
References m_local_cache_directory.
Referenced by PlatformPOSIX::GetPlatformSpecificConnectionInformation(), and lldb_private::PlatformDarwinDevice::GetSharedModuleWithLocalCache().
|
inline |
Definition at line 449 of file Platform.h.
References m_max_gid_name_len.
|
inline |
Definition at line 446 of file Platform.h.
References m_max_uid_name_len.
|
virtual |
Reimplemented in lldb_private::platform_freebsd::PlatformFreeBSD, lldb_private::platform_linux::PlatformLinux, lldb_private::platform_netbsd::PlatformNetBSD, lldb_private::platform_openbsd::PlatformOpenBSD, and lldb_private::PlatformQemuUser.
Definition at line 1264 of file Platform.cpp.
References lldb_private::eMmapFlagsAnon, lldb_private::eMmapFlagsPrivate, MAP_ANON, and MAP_PRIVATE.
|
private |
Definition at line 1665 of file Platform.cpp.
References lldb_private::FileSpec::AppendPathComponent(), GetGlobalPlatformProperties(), lldb_private::PlatformProperties::GetModuleCacheDirectory(), and lldb_private::PluginInterface::GetPluginName().
Referenced by GetCachedSharedModule().
|
virtual |
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 240 of file Platform.cpp.
References lldb_private::ModuleSpecList::FindMatchingModuleSpec(), and lldb_private::ObjectFile::GetModuleSpecifications().
Referenced by GetRemoteSharedModule().
|
inline |
Definition at line 212 of file Platform.h.
References lldb_private::PluginInterface::GetPluginName().
std::optional< std::string > Platform::GetOSBuildString | ( | ) |
Definition at line 375 of file Platform.cpp.
References GetRemoteOSBuildString(), and IsHost().
Referenced by lldb_private::PlatformDarwinDevice::GetSDKDirectoryForCurrentOSVersion(), and GetStatus().
std::optional< std::string > Platform::GetOSKernelDescription | ( | ) |
Definition at line 381 of file Platform.cpp.
References GetRemoteOSKernelDescription(), and IsHost().
Referenced by GetStatus().
|
virtual |
Get the OS version from a connected platform.
Some platforms might not be connected to a remote platform, but can figure out the OS version for a process. This is common for simulator platforms that will run native programs on the current host, but the simulator might be simulating a different OS. The process parameter might be specified to help to determine the OS version.
Reimplemented in lldb_private::PlatformDarwin.
Definition at line 333 of file Platform.cpp.
References lldb_private::Process::GetHostOSVersion(), GetRemoteOSVersion(), IsConnected(), IsHost(), m_mutex, m_os_version, and m_os_version_set_while_connected.
Referenced by lldb_private::PlatformDarwin::GetOSVersion(), and GetStatus().
|
inlinevirtual |
Reimplemented in PlatformPOSIX.
Definition at line 613 of file Platform.h.
Referenced by GetStatus().
|
virtual |
Reimplemented in lldb_private::RemoteAwarePlatform, lldb_private::platform_gdb_server::PlatformRemoteGDBServer, and lldb_private::PlatformQemuUser.
Definition at line 975 of file Platform.cpp.
References lldb_private::Host::GetProcessInfo(), and IsHost().
Referenced by lldb_private::RemoteAwarePlatform::GetProcessInfo().
|
inlinevirtual |
Locate a queue ID given a thread's qaddr.
On a system using libdispatch ("Grand Central Dispatch") style queues, a thread may be associated with a GCD queue or not, and a queue may be associated with multiple threads. The process/thread must provide a way to find the "dispatch_qaddr" for each thread, and from that dispatch_qaddr this Platform method will locate the queue ID and provide that.
[in] | process | A process is required for reading memory. |
[in] | dispatch_qaddr | The dispatch_qaddr for this thread. |
Definition at line 669 of file Platform.h.
References LLDB_INVALID_QUEUE_ID.
|
inlinevirtual |
Locate a queue name given a thread's qaddr.
On a system using libdispatch ("Grand Central Dispatch") style queues, a thread may be associated with a GCD queue or not, and a queue may be associated with multiple threads. The process/thread must provide a way to find the "dispatch_qaddr" for each thread, and from that dispatch_qaddr this Platform method will locate the queue name and provide that.
[in] | process | A process is required for reading memory. |
[in] | dispatch_qaddr | The dispatch_qaddr for this thread. |
Definition at line 646 of file Platform.h.
|
inlinevirtual |
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 235 of file Platform.h.
Referenced by GetOSBuildString().
|
inlinevirtual |
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 239 of file Platform.h.
Referenced by GetOSKernelDescription().
|
inlinevirtual |
Reimplemented in lldb_private::RemoteAwarePlatform, lldb_private::platform_android::PlatformAndroid, and lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 233 of file Platform.h.
Referenced by GetOSVersion().
|
private |
Definition at line 1503 of file Platform.cpp.
References error(), lldb_private::ModuleSpec::GetArchitecture(), GetCachedSharedModule(), lldb_private::ModuleSpec::GetFileSpec(), GetModuleSpec(), lldb_private::Process::GetModuleSpec(), lldb_private::ModuleList::GetSharedModule(), GetSupportedArchitectures(), lldb_private::Process::GetSystemArchitecture(), lldb_private::ModuleSpec::GetUUID(), lldb_private::ArchSpec::IsValid(), and lldb_private::UUID::IsValid().
Referenced by GetCachedExecutable(), and GetSharedModule().
|
inlinevirtual |
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 244 of file Platform.h.
Referenced by GetSystemArchitecture().
|
virtual |
Reimplemented in lldb_private::platform_gdb_server::PlatformRemoteGDBServer, and PlatformPOSIX.
Definition at line 1673 of file Platform.cpp.
Referenced by lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetRemoteUnixSignals(), PlatformPOSIX::GetRemoteUnixSignals(), and GetUnixSignals().
|
inline |
Definition at line 419 of file Platform.h.
References m_remote_url.
|
inlinevirtual |
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 248 of file Platform.h.
References m_working_dir.
Referenced by lldb_private::RemoteAwarePlatform::GetRemoteWorkingDirectory(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetRemoteWorkingDirectory(), and GetWorkingDirectory().
|
inlinevirtual |
Reimplemented in lldb_private::platform_linux::PlatformLinux, lldb_private::PlatformDarwin, and lldb_private::platform_netbsd::PlatformNetBSD.
Definition at line 618 of file Platform.h.
Referenced by LaunchProcess().
|
inlinevirtual |
Definition at line 558 of file Platform.h.
References m_rsync_opts.
Referenced by PlatformPOSIX::GetFile(), PlatformPOSIX::GetPlatformSpecificConnectionInformation(), and PlatformPOSIX::PutFile().
|
inlinevirtual |
Definition at line 562 of file Platform.h.
References m_rsync_prefix.
Referenced by PlatformPOSIX::GetFile(), PlatformPOSIX::GetPlatformSpecificConnectionInformation(), and PlatformPOSIX::PutFile().
|
inline |
Definition at line 455 of file Platform.h.
References m_sdk_build.
Referenced by lldb_private::PlatformDarwinDevice::GetSDKDirectoryForCurrentOSVersion().
|
inlinevirtual |
Reimplemented in lldb_private::PlatformMacOSX.
Definition at line 415 of file Platform.h.
|
inline |
Definition at line 451 of file Platform.h.
References m_sdk_sysroot.
Referenced by lldb_private::PlatformQemuUser::DebugProcess(), and GetStatus().
|
virtual |
Reimplemented in lldb_private::PlatformAppleSimulator, lldb_private::PlatformDarwin, lldb_private::PlatformMacOSX, and lldb_private::PlatformRemoteDarwinDevice.
Definition at line 199 of file Platform.cpp.
References lldb::eErrorTypeGeneric, error(), lldb_private::ModuleSpec::GetFileSpec(), GetRemoteSharedModule(), lldb_private::ModuleList::GetSharedModule(), lldb_private::ConstString::GetStringRef(), IsHost(), m_sdk_sysroot, and lldb_private::FileSpec::PrependPathComponent().
Referenced by lldb_private::PlatformDarwin::FindBundleBinaryInExecSearchPaths(), and lldb_private::PlatformDarwin::GetSharedModule().
|
virtual |
Reimplemented in lldb_private::platform_freebsd::PlatformFreeBSD, lldb_private::platform_linux::PlatformLinux, and lldb_private::platform_netbsd::PlatformNetBSD.
Definition at line 1967 of file Platform.cpp.
|
virtual |
Reimplemented in lldb_private::platform_gdb_server::PlatformRemoteGDBServer, lldb_private::PlatformDarwin, and lldb_private::PlatformWindows.
Definition at line 1830 of file Platform.cpp.
References lldb_private::eCodeAlternateISA, lldb_private::ArchSpec::eRISCV_rvc, lldb_private::eUnknown, lldb_private::Target::GetArchitecture(), lldb_private::ArchSpec::GetFlags(), lldb_private::ArchSpec::GetMachine(), lldb_private::BreakpointSite::GetOwnerAtIndex(), lldb_private::ArchSpec::IsValid(), and lldb_private::BreakpointSite::SetTrapOpcode().
Referenced by lldb_private::PlatformDarwin::GetSoftwareBreakpointTrapOpcode(), and lldb_private::PlatformWindows::GetSoftwareBreakpointTrapOpcode().
|
inlinevirtual |
Definition at line 572 of file Platform.h.
References m_ssh_opts.
Referenced by PlatformPOSIX::GetPlatformSpecificConnectionInformation().
|
virtual |
Report the current status for this platform.
The returned string usually involves returning the OS version (if available), and any SDK directory that might be being used for local file caching, and if connected a quick blurb about what this platform is connected to.
Reimplemented in lldb_private::PlatformWindows, lldb_private::platform_freebsd::PlatformFreeBSD, lldb_private::platform_linux::PlatformLinux, lldb_private::PlatformAppleSimulator, lldb_private::PlatformRemoteDarwinDevice, lldb_private::platform_netbsd::PlatformNetBSD, and lldb_private::platform_openbsd::PlatformOpenBSD.
Definition at line 284 of file Platform.cpp.
References lldb_private::Stream::AsRawOstream(), lldb_private::ArchSpec::DumpTriple(), lldb_private::Stream::EOL(), lldb_private::Stream::Format(), GetHostname(), GetOSBuildString(), GetOSKernelDescription(), GetOSVersion(), GetPlatformSpecificConnectionInformation(), lldb_private::PluginInterface::GetPluginName(), GetSDKRootDirectory(), GetSystemArchitecture(), lldb_private::ArchSpec::GetTriple(), GetWorkingDirectory(), IsConnected(), IsHost(), lldb_private::ArchSpec::IsValid(), and lldb_private::Stream::Printf().
Referenced by lldb_private::PlatformWindows::GetStatus(), lldb_private::platform_freebsd::PlatformFreeBSD::GetStatus(), lldb_private::platform_linux::PlatformLinux::GetStatus(), lldb_private::PlatformAppleSimulator::GetStatus(), lldb_private::PlatformRemoteDarwinDevice::GetStatus(), lldb_private::platform_netbsd::PlatformNetBSD::GetStatus(), and lldb_private::platform_openbsd::PlatformOpenBSD::GetStatus().
|
pure virtual |
Get the platform's supported architectures in the order in which they should be searched.
[in] | process_host_arch | The process host architecture if it's known. An invalid ArchSpec represents that the process host architecture is unknown. |
Implemented in lldb_private::platform_freebsd::PlatformFreeBSD, lldb_private::platform_gdb_server::PlatformRemoteGDBServer, lldb_private::platform_linux::PlatformLinux, lldb_private::PlatformAppleSimulator, lldb_private::PlatformMacOSX, lldb_private::PlatformRemoteAppleBridge, lldb_private::PlatformRemoteAppleWatch, lldb_private::PlatformRemoteiOS, lldb_private::PlatformRemoteMacOSX, lldb_private::platform_netbsd::PlatformNetBSD, lldb_private::platform_openbsd::PlatformOpenBSD, lldb_private::PlatformQemuUser, lldb_private::PlatformWindows, and lldb_private::PlatformRemoteAppleTV.
Referenced by GetRemoteSharedModule(), IsCompatibleArchitecture(), ResolveExecutable(), lldb_private::RemoteAwarePlatform::ResolveExecutable(), lldb_private::PlatformRemoteDarwinDevice::ResolveExecutable(), and ResolveRemoteExecutable().
|
inlinevirtual |
Definition at line 554 of file Platform.h.
References m_supports_rsync.
Referenced by PlatformPOSIX::GetFile(), PlatformPOSIX::GetPlatformSpecificConnectionInformation(), lldb_private::PlatformDarwinDevice::GetSharedModuleWithLocalCache(), Install(), and PlatformPOSIX::PutFile().
|
inlinevirtual |
Definition at line 568 of file Platform.h.
References m_supports_ssh.
Referenced by PlatformPOSIX::GetPlatformSpecificConnectionInformation().
const ArchSpec & Platform::GetSystemArchitecture | ( | ) |
Definition at line 885 of file Platform.cpp.
References GetRemoteSystemArchitecture(), IsConnected(), IsHost(), lldb_private::ArchSpec::IsValid(), m_system_arch, and m_system_arch_set_while_connected.
Referenced by lldb_private::PlatformDarwin::ARMGetSupportedArchitectures(), GetStatus(), lldb_private::PlatformRemoteAppleWatch::GetSupportedArchitectures(), lldb_private::PlatformRemoteAppleTV::GetSupportedArchitectures(), and lldb_private::PosixPlatformCommandOptionValidator::IsValid().
|
virtual |
Provide a list of trap handler function names for this platform.
The unwinder needs to treat trap handlers specially – the stack frame may not be aligned correctly for a trap handler (the kernel often won't perturb the stack pointer, or won't re-align it properly, in the process of calling the handler) and the frame above the handler needs to be treated by the unwinder's "frame 0" rules instead of its "middle of the stack frame" rules.
In a user process debugging scenario, the list of trap handlers is typically just "_sigtramp".
The Platform base class provides the m_trap_handlers ivar but it does not populate it. Subclasses should add the names of the asynchronous signal handler routines as needed. For most Unix platforms, add _sigtramp.
Definition at line 1472 of file Platform.cpp.
References CalculateTrapHandlerSymbolNames(), m_calculated_trap_handlers, m_mutex, and m_trap_handlers.
|
inlinevirtual |
Try to get a specific unwind plan for a named trap handler.
The default is not to have specific unwind plans for trap handlers.
[in] | triple | Triple of the current target. |
[in] | name | Name of the trap handler function. |
Reimplemented in lldb_private::platform_linux::PlatformLinux.
Definition at line 708 of file Platform.h.
UnixSignalsSP Platform::GetUnixSignals | ( | ) |
Definition at line 1678 of file Platform.cpp.
References lldb_private::UnixSignals::CreateForHost(), GetRemoteUnixSignals(), and IsHost().
|
virtual |
Reimplemented in lldb_private::RemoteAwarePlatform, lldb_private::platform_gdb_server::PlatformRemoteGDBServer, and lldb_private::PlatformQemuUser.
Definition at line 718 of file Platform.cpp.
References lldb_private::UserIDResolver::GetNoopResolver(), and IsHost().
Referenced by lldb_private::RemoteAwarePlatform::GetUserIDResolver().
FileSpec Platform::GetWorkingDirectory | ( | ) |
Definition at line 396 of file Platform.cpp.
References GetRemoteWorkingDirectory(), lldb_private::FileSystem::Instance(), IsHost(), m_working_dir, and lldb_private::FileSystem::Resolve().
Referenced by GetStatus(), Install(), and LoadImage().
|
static |
Definition at line 137 of file Platform.cpp.
Referenced by lldb_private::platform_freebsd::PlatformFreeBSD::Initialize(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::Initialize(), lldb_private::platform_linux::PlatformLinux::Initialize(), lldb_private::PlatformDarwin::Initialize(), lldb_private::platform_netbsd::PlatformNetBSD::Initialize(), lldb_private::platform_openbsd::PlatformOpenBSD::Initialize(), and lldb_private::PlatformWindows::Initialize().
Install a file or directory to the remote system.
Install is similar to Platform::PutFile(), but it differs in that if an application/framework/shared library is installed on a remote platform and the remote platform requires something to be done to register the application/framework/shared library, then this extra registration can be done.
[in] | src | The source file/directory to install on the remote system. |
[in] | dst | The destination file/directory where src will be installed. If dst has no filename specified, then its filename will be set from src. It dst has no directory specified, it will use the platform working directory. If dst has a directory specified, but the directory path is relative, the platform working directory will be prepended to the relative directory. |
Definition at line 508 of file Platform.cpp.
References lldb_private::FileSpec::AppendPathComponent(), CreateSymlink(), lldb_private::FileSystem::EnumerateDirectory(), error(), RecurseCopyBaton::error, lldb_private::ConstString::GetCString(), lldb_private::FileSpec::GetDirectory(), lldb_private::FileSpec::GetFilename(), lldb_private::GetLog(), lldb_private::FileSpec::GetPath(), lldb_private::FileSpec::GetPathAsConstString(), lldb_private::FileSystem::GetPermissions(), GetSupportsRSync(), GetWorkingDirectory(), lldb_private::FileSystem::Instance(), LLDB_LOGF, MakeDirectory(), lldb_private::Platform, PutFile(), lldb_private::FileSystem::Readlink(), RecurseCopy_Callback(), lldb_private::FileSpec::SetDirectory(), and lldb_private::FileSpec::SetFilename().
Referenced by LoadImage().
|
virtual |
Lets a platform answer if it is compatible with a given architecture and the target triple contained within.
Definition at line 1157 of file Platform.cpp.
References lldb_private::ArchSpec::Clear(), GetSupportedArchitectures(), lldb_private::ArchSpec::IsMatch(), and lldb_private::ArchSpec::IsValid().
Referenced by GetAugmentedArchSpec().
|
inlinevirtual |
Reimplemented in lldb_private::RemoteAwarePlatform, lldb_private::platform_gdb_server::PlatformRemoteGDBServer, and lldb_private::PlatformQemuUser.
Definition at line 427 of file Platform.h.
References IsHost().
Referenced by GetOSVersion(), GetStatus(), GetSystemArchitecture(), lldb_private::RemoteAwarePlatform::IsConnected(), and SetOSVersion().
|
inline |
Definition at line 421 of file Platform.h.
References m_is_host.
Referenced by PlatformPOSIX::Attach(), lldb_private::PlatformWindows::Attach(), CalculateMD5(), lldb_private::platform_freebsd::PlatformFreeBSD::CanDebugProcess(), lldb_private::platform_linux::PlatformLinux::CanDebugProcess(), lldb_private::platform_netbsd::PlatformNetBSD::CanDebugProcess(), lldb_private::PlatformDarwin::CheckLocalSharedCache(), CloseFile(), ConnectRemote(), lldb_private::platform_android::PlatformAndroid::ConnectRemote(), PlatformPOSIX::ConnectRemote(), lldb_private::PlatformWindows::ConnectRemote(), CreateSymlink(), PlatformPOSIX::DebugProcess(), lldb_private::PlatformDarwin::DebugProcess(), DisconnectRemote(), PlatformPOSIX::DisconnectRemote(), lldb_private::PlatformWindows::DisconnectRemote(), FindProcesses(), GetCachedSharedModule(), lldb_private::platform_freebsd::PlatformFreeBSD::GetDescription(), lldb_private::platform_linux::PlatformLinux::GetDescription(), lldb_private::platform_netbsd::PlatformNetBSD::GetDescription(), lldb_private::platform_openbsd::PlatformOpenBSD::GetDescription(), lldb_private::PlatformWindows::GetDescription(), GetEnvironment(), lldb_private::platform_android::PlatformAndroid::GetFile(), PlatformPOSIX::GetFile(), GetFileExists(), GetFilePermissions(), GetFileSize(), GetHostname(), GetOSBuildString(), GetOSKernelDescription(), GetOSVersion(), lldb_private::platform_android::PlatformAndroid::GetPluginName(), lldb_private::platform_freebsd::PlatformFreeBSD::GetPluginName(), lldb_private::platform_linux::PlatformLinux::GetPluginName(), lldb_private::platform_netbsd::PlatformNetBSD::GetPluginName(), lldb_private::platform_openbsd::PlatformOpenBSD::GetPluginName(), lldb_private::PlatformWindows::GetPluginName(), GetProcessInfo(), GetSharedModule(), lldb_private::PlatformDarwinDevice::GetSharedModuleWithLocalCache(), GetStatus(), lldb_private::platform_freebsd::PlatformFreeBSD::GetStatus(), lldb_private::platform_linux::PlatformLinux::GetStatus(), lldb_private::platform_netbsd::PlatformNetBSD::GetStatus(), lldb_private::platform_openbsd::PlatformOpenBSD::GetStatus(), GetSystemArchitecture(), GetUnixSignals(), GetUserIDResolver(), GetWorkingDirectory(), IsConnected(), KillProcess(), LaunchProcess(), MakeDirectory(), OpenFile(), lldb_private::platform_android::PlatformAndroid::PutFile(), PlatformPOSIX::PutFile(), ReadFile(), lldb_private::RemoteAwarePlatform::ResolveExecutable(), RunShellCommand(), SetFilePermissions(), SetOSVersion(), SetSystemArchitecture(), SetWorkingDirectory(), ShellExpandArguments(), Unlink(), and WriteFile().
|
inline |
Definition at line 425 of file Platform.h.
References m_is_host.
Referenced by lldb_private::platform_gdb_server::PlatformRemoteGDBServer::Attach(), lldb_private::PlatformWindows::DebugProcess(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::DebugProcess(), lldb_private::RemoteAwarePlatform::GetFileWithUUID(), PlatformPOSIX::GetRemoteUnixSignals(), lldb_private::RemoteAwarePlatform::GetRemoteWorkingDirectory(), lldb_private::PlatformDarwin::GetSharedModule(), LoadImage(), lldb_private::process_gdb_remote::ProcessGDBRemote::SaveCore(), and lldb_private::RemoteAwarePlatform::SetRemoteWorkingDirectory().
|
virtual |
Kill process on a platform.
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 1048 of file Platform.cpp.
References lldb_private::GetLog(), IsHost(), lldb_private::Host::Kill(), LLDB_LOGF, lldb_private::Platform, and SIGKILL.
Referenced by lldb_private::RemoteAwarePlatform::KillProcess().
|
virtual |
Launch a new process on a platform, not necessarily for debugging, it could be just for running the process.
Reimplemented in lldb_private::RemoteAwarePlatform, lldb_private::platform_gdb_server::PlatformRemoteGDBServer, lldb_private::PlatformAppleSimulator, and lldb_private::PlatformDarwin.
Definition at line 994 of file Platform.cpp.
References lldb_private::ProcessLaunchInfo::ConvertArgumentsForLaunchingInShell(), error(), lldb_private::ProcessLaunchInfo::GetFlags(), lldb_private::GetLog(), lldb_private::FileSpec::GetPath(), lldb_private::ProcessLaunchInfo::GetResumeCount(), GetResumeCountForLaunchInfo(), lldb_private::ProcessLaunchInfo::GetShell(), IsHost(), lldb_private::Host::LaunchProcess(), LLDB_LOGF, lldb_private::Platform, lldb_private::Flags::Set(), ShellExpandArguments(), and lldb_private::Flags::Test().
Referenced by DebugProcess(), lldb_private::RemoteAwarePlatform::LaunchProcess(), and lldb_private::PlatformDarwin::LaunchProcess().
uint32_t Platform::LoadImage | ( | lldb_private::Process * | process, |
const lldb_private::FileSpec & | local_file, | ||
const lldb_private::FileSpec & | remote_file, | ||
lldb_private::Status & | error | ||
) |
Load a shared library into this process.
Try and load a shared library into the current process. This call might fail in the dynamic loader plug-in says it isn't safe to try and load shared libraries at the moment.
[in] | process | The process to load the image. |
[in] | local_file | The file spec that points to the shared library that you want to load if the library is located on the host. The library will be copied over to the location specified by remote_file or into the current working directory with the same filename if the remote_file isn't specified. |
[in] | remote_file | If local_file is specified then the location where the library should be copied over from the host. If local_file isn't specified, then the path for the shared library on the target what you want to load. |
[out] | error | An error object that gets filled in with any errors that might occur when trying to load the shared library. |
Definition at line 1684 of file Platform.cpp.
References lldb_private::FileSpec::AppendPathComponent(), lldb_private::ConstString::AsCString(), DoLoadImage(), error(), lldb_private::FileSpec::GetFilename(), GetWorkingDirectory(), Install(), IsRemote(), and LLDB_INVALID_IMAGE_TOKEN.
uint32_t Platform::LoadImageUsingPaths | ( | lldb_private::Process * | process, |
const lldb_private::FileSpec & | library_name, | ||
const std::vector< std::string > & | paths, | ||
lldb_private::Status & | error, | ||
lldb_private::FileSpec * | loaded_path | ||
) |
Load a shared library specified by base name into this process, looking by hand along a set of paths.
[in] | process | The process to load the image. |
[in] | library_name | The name of the library to look for. If library_name is an absolute path, the basename will be extracted and searched for along the paths. This emulates the behavior of the loader when given an install name and a set (e.g. DYLD_LIBRARY_PATH provided) of alternate paths. |
[in] | paths | The list of paths to use to search for the library. First match wins. |
[out] | error | An error object that gets filled in with any errors that might occur when trying to load the shared library. |
[out] | loaded_path | If non-null, the path to the dylib that was successfully loaded is stored in this path. |
Definition at line 1730 of file Platform.cpp.
References DoLoadImage(), error(), lldb_private::FileSpec::GetFilename(), lldb_private::FileSpec::GetPathStyle(), lldb_private::ConstString::GetStringRef(), and lldb_private::FileSpec::IsAbsolute().
|
inlinevirtual |
Detect a binary in memory that will determine which Platform and DynamicLoader should be used in this target/process, and update the Platform/DynamicLoader.
The binary will be loaded into the Target, or will be registered with the DynamicLoader so that it will be loaded at a later stage. Returns true to indicate that this is a platform binary and has been loaded/registered, no further action should be taken by the caller.
[in] | process | Process read memory from, a Process must be provided. |
[in] | addr | Address of a binary in memory. |
[in] | notify | Whether ModulesDidLoad should be called, if a binary is loaded. Caller may prefer to call ModulesDidLoad for multiple binaries that were loaded at the same time. |
Definition at line 873 of file Platform.h.
|
inlinevirtual |
Find a support executable that may not live within in the standard locations related to LLDB.
Executable might exist within the Platform SDK directories, or in standard tool directories within the current IDE that is running LLDB.
[in] | basename | The basename of the executable to locate in the current platform. |
Reimplemented in lldb_private::PlatformDarwin.
Definition at line 725 of file Platform.h.
Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunication::StartDebugserverProcess().
|
virtual |
Reimplemented in lldb_private::PlatformDarwin.
Definition at line 160 of file Platform.cpp.
Reimplemented in lldb_private::platform_gdb_server::PlatformRemoteGDBServer, and lldb_private::RemoteAwarePlatform.
Definition at line 634 of file Platform.cpp.
References error(), lldb_private::FileSpec::GetPath(), lldb_private::PluginInterface::GetPluginName(), and IsHost().
Referenced by Install(), lldb_private::RemoteAwarePlatform::MakeDirectory(), and RecurseCopy_Callback().
|
inlinevirtual |
Reimplemented in lldb_private::PlatformDarwin.
Definition at line 479 of file Platform.h.
|
virtual |
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 674 of file Platform.cpp.
References error(), lldb_private::FileCache::GetInstance(), IsHost(), lldb_private::FileCache::OpenFile(), and UINT64_MAX.
Referenced by DownloadModuleSlice(), lldb_private::RemoteAwarePlatform::OpenFile(), and PutFile().
|
virtual |
Reimplemented in lldb_private::platform_android::PlatformAndroid, lldb_private::platform_gdb_server::PlatformRemoteGDBServer, lldb_private::PlatformDarwin, and PlatformPOSIX.
Definition at line 1178 of file Platform.cpp.
References CloseFile(), lldb_private::File::eOpenOptionCanCreate, lldb_private::File::eOpenOptionCloseOnExec, lldb_private::File::eOpenOptionDontFollowSymlinks, lldb_private::File::eOpenOptionReadOnly, lldb_private::File::eOpenOptionTruncate, lldb_private::File::eOpenOptionWriteOnly, error(), lldb_private::GetLog(), lldb_private::FileSpec::GetPath(), lldb_private::FileSystem::Instance(), LLDB_LOGF, lldb_private::FileSystem::Open(), OpenFile(), lldb_private::Platform, UINT32_MAX, UINT64_MAX, and WriteFile().
Referenced by Install(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::PutFile(), PlatformPOSIX::PutFile(), and RecurseCopy_Callback().
|
virtual |
Reimplemented in lldb_private::platform_gdb_server::PlatformRemoteGDBServer, and lldb_private::RemoteAwarePlatform.
Definition at line 698 of file Platform.cpp.
References error(), lldb_private::FileCache::GetInstance(), lldb_private::PluginInterface::GetPluginName(), IsHost(), and lldb_private::FileCache::ReadFile().
Referenced by DownloadModuleSlice(), and lldb_private::RemoteAwarePlatform::ReadFile().
|
virtual |
Find a platform plugin for a given process.
Scans the installed Platform plug-ins and tries to find an instance that can be used for process
[in] | process | The process for which to try and locate a platform plug-in instance. |
[in] | plugin_name | An optional name of a specific platform plug-in that should be used. If nullptr, pick the best plug-in. Set the target's executable based off of the existing architecture information in target given a path to an executable exe_file. |
Each platform knows the architectures that it supports and can select the correct architecture slice within exe_file by inspecting the architecture in target. If the target had an architecture specified, then in can try and obey that request and optionally fail if the architecture doesn't match up. If no architecture is specified, the platform should select the default architecture from exe_file. Any application bundles or executable wrappers can also be inspected for the actual application binary within the bundle that should be used.
Reimplemented in lldb_private::RemoteAwarePlatform, lldb_private::PlatformAppleSimulator, and lldb_private::PlatformRemoteDarwinDevice.
Definition at line 768 of file Platform.cpp.
References error(), lldb_private::ModuleSpec::GetArchitecture(), lldb_private::ModuleSpec::GetFileSpec(), lldb_private::FileSpec::GetPath(), lldb_private::ModuleList::GetSharedModule(), GetSupportedArchitectures(), lldb_private::FileSystem::Instance(), and lldb_private::ArchSpec::IsValid().
|
protectedvirtual |
Definition at line 803 of file Platform.cpp.
References error(), lldb_private::ModuleSpec::GetArchitecture(), lldb_private::StreamString::GetData(), lldb_private::ModuleSpec::GetFileSpec(), lldb_private::PluginInterface::GetPluginName(), lldb_private::ModuleList::GetSharedModule(), GetSupportedArchitectures(), lldb_private::ModuleSpec::GetUUID(), lldb_private::FileSystem::Instance(), lldb_private::ArchSpec::IsValid(), lldb_private::UUID::IsValid(), and lldb_private::Host::ResolveExecutableInBundle().
Referenced by GetCachedExecutable().
|
virtual |
Resolves the FileSpec to a (possibly) remote path.
Remote platforms must override this to resolve to a path on the remote side.
Definition at line 878 of file Platform.cpp.
References lldb_private::FileSystem::Instance(), and lldb_private::FileSystem::Resolve().
|
virtual |
Find a symbol file given a symbol file module specification.
Each platform might have tricks to find symbol files for an executable given information in a symbol file ModuleSpec. Some platforms might also support symbol files that are bundles and know how to extract the right symbol file given a bundle.
[in] | target | The target in which we are trying to resolve the symbol file. The target has a list of modules that we might be able to use in order to help find the right symbol file. If the "m_file" or "m_platform_file" entries in the sym_spec are filled in, then we might be able to locate a module in the target, extract its UUID and locate a symbol file. If just the "m_uuid" is specified, then we might be able to find the module in the target that matches that UUID and pair the symbol file along with it. If just "m_symbol_file" is specified, we can use a variety of tricks to locate the symbols in an SDK, PDK, or other development kit location. |
[in] | sym_spec | A module spec that describes some information about the symbol file we are trying to resolve. The ModuleSpec might contain the following: m_file - A full or partial path to an executable from the target (might be empty). m_platform_file - Another executable hint that contains the path to the file as known on the local/remote platform. m_symbol_file - A full or partial path to a symbol file or symbol bundle that should be used when trying to resolve the symbol file. m_arch - The architecture we are looking for when resolving the symbol file. m_uuid - The UUID of the executable and symbol file. This can often be used to match up an executable with a symbol file, or resolve an symbol file in a symbol file bundle. |
[out] | sym_file | The resolved symbol file spec if the returned error indicates success. |
Reimplemented in lldb_private::PlatformDarwin.
Definition at line 868 of file Platform.cpp.
References error(), lldb_private::ModuleSpec::GetSymbolFileSpec(), and lldb_private::FileSystem::Instance().
|
virtual |
Reimplemented in lldb_private::RemoteAwarePlatform.
Definition at line 1278 of file Platform.cpp.
References RunShellCommand().
Referenced by chown_file(), RunShellCommand(), and lldb_private::RemoteAwarePlatform::RunShellCommand().
|
virtual |
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 1292 of file Platform.cpp.
References IsHost(), and lldb_private::Host::RunShellCommand().
|
virtual |
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 661 of file Platform.cpp.
References error(), lldb_private::FileSpec::GetPath(), lldb_private::PluginInterface::GetPluginName(), and IsHost().
Referenced by lldb_private::RemoteAwarePlatform::SetFilePermissions().
|
static |
Definition at line 146 of file Platform.cpp.
References GetHostPlatformSP().
Referenced by lldb_private::platform_android::PlatformAndroid::Initialize(), lldb_private::platform_freebsd::PlatformFreeBSD::Initialize(), lldb_private::platform_linux::PlatformLinux::Initialize(), lldb_private::PlatformMacOSX::Initialize(), lldb_private::platform_netbsd::PlatformNetBSD::Initialize(), lldb_private::platform_openbsd::PlatformOpenBSD::Initialize(), and lldb_private::PlatformWindows::Initialize().
|
inlinevirtual |
Definition at line 578 of file Platform.h.
References m_ignores_remote_hostname.
Referenced by PlatformPOSIX::ConnectRemote().
|
virtual |
Definition at line 1321 of file Platform.cpp.
References m_local_cache_directory.
Referenced by PlatformPOSIX::ConnectRemote().
bool Platform::SetOSVersion | ( | llvm::VersionTuple | os_version | ) |
Definition at line 745 of file Platform.cpp.
References IsConnected(), IsHost(), and m_os_version.
|
virtual |
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 737 of file Platform.cpp.
References lldb_private::GetLog(), lldb_private::FileSpec::GetPath(), LLDB_LOGF, m_working_dir, and lldb_private::Platform.
Referenced by lldb_private::RemoteAwarePlatform::SetRemoteWorkingDirectory(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::SetRemoteWorkingDirectory(), and SetWorkingDirectory().
|
inlinevirtual |
Definition at line 560 of file Platform.h.
References m_rsync_opts.
Referenced by PlatformPOSIX::ConnectRemote().
|
inlinevirtual |
Definition at line 564 of file Platform.h.
References m_rsync_prefix.
Referenced by PlatformPOSIX::ConnectRemote().
|
inline |
Definition at line 457 of file Platform.h.
References m_sdk_build.
|
inline |
Definition at line 453 of file Platform.h.
References m_sdk_sysroot.
|
inlinevirtual |
Definition at line 574 of file Platform.h.
References m_ssh_opts.
Referenced by PlatformPOSIX::ConnectRemote().
|
inlinevirtual |
Definition at line 556 of file Platform.h.
References m_supports_rsync.
Referenced by PlatformPOSIX::ConnectRemote().
|
inlinevirtual |
Definition at line 570 of file Platform.h.
References m_supports_ssh.
Referenced by PlatformPOSIX::ConnectRemote().
|
inline |
Definition at line 434 of file Platform.h.
References IsHost(), lldb_private::ArchSpec::IsValid(), m_os_version_set_while_connected, and m_system_arch.
|
virtual |
Reimplemented in lldb_private::PlatformDarwin.
Definition at line 1402 of file Platform.cpp.
bool Platform::SetWorkingDirectory | ( | const FileSpec & | working_dir | ) |
Definition at line 619 of file Platform.cpp.
References lldb_private::FileSpec::Clear(), lldb_private::GetLog(), lldb_private::FileSpec::GetPath(), IsHost(), LLDB_LOG, m_working_dir, lldb_private::Platform, and SetRemoteWorkingDirectory().
|
virtual |
Perform expansion of the command-line for this launch info This can potentially involve wildcard expansion environment variable replacement, and whatever other argument magic the platform defines as part of its typical user experience.
Definition at line 1042 of file Platform.cpp.
References IsHost(), and lldb_private::Host::ShellExpandArguments().
Referenced by LaunchProcess().
|
inlinevirtual |
Reimplemented in lldb_private::PlatformDarwin.
Definition at line 462 of file Platform.h.
|
static |
Definition at line 139 of file Platform.cpp.
Referenced by lldb_private::platform_freebsd::PlatformFreeBSD::Terminate(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::Terminate(), lldb_private::platform_linux::PlatformLinux::Terminate(), lldb_private::PlatformDarwin::Terminate(), lldb_private::platform_netbsd::PlatformNetBSD::Terminate(), lldb_private::platform_openbsd::PlatformOpenBSD::Terminate(), and lldb_private::PlatformWindows::Terminate().
Reimplemented in lldb_private::RemoteAwarePlatform, and lldb_private::platform_gdb_server::PlatformRemoteGDBServer.
Definition at line 1258 of file Platform.cpp.
References lldb_private::FileSpec::GetPath(), and IsHost().
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::SaveCore(), and lldb_private::RemoteAwarePlatform::Unlink().
|
virtual |
Reimplemented in PlatformPOSIX, and lldb_private::PlatformWindows.
Definition at line 1747 of file Platform.cpp.
|
virtual |
Reimplemented in lldb_private::platform_gdb_server::PlatformRemoteGDBServer, and lldb_private::RemoteAwarePlatform.
Definition at line 708 of file Platform.cpp.
References error(), lldb_private::FileCache::GetInstance(), lldb_private::PluginInterface::GetPluginName(), IsHost(), and lldb_private::FileCache::WriteFile().
Referenced by PutFile(), and lldb_private::RemoteAwarePlatform::WriteFile().
|
protected |
Definition at line 927 of file Platform.h.
Referenced by GetTrapHandlerSymbolNames().
|
protected |
Definition at line 909 of file Platform.h.
Referenced by GetHostname(), and lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetHostname().
|
protected |
Definition at line 924 of file Platform.h.
Referenced by GetIgnoresRemoteHostname(), and SetIgnoresRemoteHostname().
|
protected |
Definition at line 895 of file Platform.h.
Referenced by IsHost(), and IsRemote().
|
protected |
Definition at line 925 of file Platform.h.
Referenced by GetLocalCacheDirectory(), and SetLocalCacheDirectory().
|
protected |
Definition at line 918 of file Platform.h.
Referenced by GetMaxGroupIDNameLength().
|
protected |
Definition at line 917 of file Platform.h.
Referenced by GetMaxUserIDNameLength().
|
protected |
Definition at line 928 of file Platform.h.
Referenced by GetCachedSharedModule().
|
protected |
Definition at line 916 of file Platform.h.
Referenced by lldb_private::PlatformDarwin::AddClangModuleCompilationOptionsForSDKType(), GetOSVersion(), and GetTrapHandlerSymbolNames().
|
protected |
Definition at line 910 of file Platform.h.
Referenced by GetOSVersion(), lldb_private::RemoteAwarePlatform::GetRemoteOSVersion(), lldb_private::platform_android::PlatformAndroid::GetRemoteOSVersion(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetRemoteOSVersion(), and SetOSVersion().
|
protected |
Definition at line 901 of file Platform.h.
Referenced by GetOSVersion(), and SetSystemArchitecture().
|
protected |
Definition at line 908 of file Platform.h.
Referenced by GetRemoteURL().
|
protected |
Definition at line 920 of file Platform.h.
Referenced by GetRSyncOpts(), and SetRSyncOpts().
|
protected |
Definition at line 921 of file Platform.h.
Referenced by GetRSyncPrefix(), and SetRSyncPrefix().
|
protected |
Definition at line 905 of file Platform.h.
Referenced by GetSDKBuild(), and SetSDKBuild().
|
protected |
Definition at line 904 of file Platform.h.
Referenced by lldb_private::PlatformDarwinDevice::GetDeviceSupportDirectoryForOSVersion(), GetSDKRootDirectory(), GetSharedModule(), SetSDKRootDirectory(), and lldb_private::PlatformDarwinDevice::UpdateSDKDirectoryInfosIfNeeded().
|
protected |
Definition at line 923 of file Platform.h.
Referenced by GetSSHOpts(), and SetSSHOpts().
|
protected |
Definition at line 919 of file Platform.h.
Referenced by GetSupportsRSync(), and SetSupportsRSync().
|
protected |
Definition at line 922 of file Platform.h.
Referenced by GetSupportsSSH(), and SetSupportsSSH().
|
protected |
Definition at line 912 of file Platform.h.
Referenced by GetSystemArchitecture(), and SetSystemArchitecture().
|
protected |
Definition at line 902 of file Platform.h.
Referenced by GetSystemArchitecture().
|
protected |
Definition at line 926 of file Platform.h.
Referenced by lldb_private::platform_freebsd::PlatformFreeBSD::CalculateTrapHandlerSymbolNames(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::CalculateTrapHandlerSymbolNames(), lldb_private::platform_linux::PlatformLinux::CalculateTrapHandlerSymbolNames(), lldb_private::PlatformDarwin::CalculateTrapHandlerSymbolNames(), lldb_private::platform_netbsd::PlatformNetBSD::CalculateTrapHandlerSymbolNames(), lldb_private::platform_openbsd::PlatformOpenBSD::CalculateTrapHandlerSymbolNames(), PlatformPOSIX::CalculateTrapHandlerSymbolNames(), and GetTrapHandlerSymbolNames().
|
protected |
Definition at line 906 of file Platform.h.
Referenced by lldb_private::platform_gdb_server::PlatformRemoteGDBServer::ConnectRemote(), GetRemoteWorkingDirectory(), GetWorkingDirectory(), SetRemoteWorkingDirectory(), and SetWorkingDirectory().