LLDB mainline
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
lldb_private::PlatformAppleSimulator Class Reference

#include <PlatformAppleSimulator.h>

Inheritance diagram for lldb_private::PlatformAppleSimulator:
Inheritance graph
[legend]

Public Member Functions

 PlatformAppleSimulator (const char *class_name, const char *description, ConstString plugin_name, llvm::Triple::OSType preferred_os, llvm::SmallVector< llvm::StringRef, 4 > supported_triples, std::string sdk_name_primary, std::string sdk_name_secondary, XcodeSDK::Type sdk_type, CoreSimulatorSupport::DeviceType::ProductFamilyID kind)
 Default Constructor.
 
 ~PlatformAppleSimulator () override
 Destructor.
 
llvm::StringRef GetPluginName () override
 
llvm::StringRef GetDescription () override
 
Status LaunchProcess (ProcessLaunchInfo &launch_info) override
 Launch a new process on a platform, not necessarily for debugging, it could be just for running the process.
 
void GetStatus (Stream &strm) override
 Report the current status for this platform.
 
Status ConnectRemote (Args &args) override
 
Status DisconnectRemote () override
 
lldb::ProcessSP DebugProcess (ProcessLaunchInfo &launch_info, Debugger &debugger, Target &target, Status &error) override
 Subclasses do not need to implement this function as it uses the Platform::LaunchProcess() followed by Platform::Attach ().
 
std::vector< ArchSpecGetSupportedArchitectures (const ArchSpec &process_host_arch) override
 Get the platform's supported architectures in the order in which they should be searched.
 
Status ResolveExecutable (const ModuleSpec &module_spec, lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr) override
 Find a platform plugin for a given process.
 
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) override
 
uint32_t FindProcesses (const ProcessInstanceInfoMatch &match_info, ProcessInstanceInfoList &process_infos) override
 Attach to an existing process by process name.
 
void AddClangModuleCompilationOptions (Target *target, std::vector< std::string > &options) override
 
- Public Member Functions inherited from lldb_private::PlatformDarwin
 ~PlatformDarwin () override
 Destructor.
 
Status PutFile (const FileSpec &source, const FileSpec &destination, uint32_t uid=UINT32_MAX, uint32_t gid=UINT32_MAX) override
 
Status ResolveSymbolFile (Target &target, const ModuleSpec &sym_spec, FileSpec &sym_file) override
 Find a symbol file given a symbol file module specification.
 
FileSpecList LocateExecutableScriptingResources (Target *target, Module &module, Stream &feedback_stream) override
 
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) override
 
size_t GetSoftwareBreakpointTrapOpcode (Target &target, BreakpointSite *bp_site) override
 
lldb::BreakpointSP SetThreadCreationBreakpoint (Target &target) override
 
bool ModuleIsExcludedForUnconstrainedSearches (Target &target, const lldb::ModuleSP &module_sp) override
 
void ARMGetSupportedArchitectures (std::vector< ArchSpec > &archs, std::optional< llvm::Triple::OSType > os={})
 The architecture selection rules for arm processors These cpu subtypes have distinct names (e.g.
 
void x86GetSupportedArchitectures (std::vector< ArchSpec > &archs)
 
uint32_t GetResumeCountForLaunchInfo (ProcessLaunchInfo &launch_info) override
 
lldb::ProcessSP DebugProcess (ProcessLaunchInfo &launch_info, Debugger &debugger, Target &target, Status &error) override
 Subclasses do not need to implement this function as it uses the Platform::LaunchProcess() followed by Platform::Attach ().
 
void CalculateTrapHandlerSymbolNames () override
 Ask the Platform subclass to fill in the list of trap handler names.
 
llvm::VersionTuple GetOSVersion (Process *process=nullptr) override
 Get the OS version from a connected platform.
 
bool SupportsModules () override
 
ConstString GetFullNameForDylib (ConstString basename) override
 
FileSpec LocateExecutable (const char *basename) override
 Find a support executable that may not live within in the standard locations related to LLDB.
 
Status LaunchProcess (ProcessLaunchInfo &launch_info) override
 Launch a new process on a platform, not necessarily for debugging, it could be just for running the process.
 
Args GetExtraStartupCommands () override
 
llvm::Expected< StructuredData::DictionarySPFetchExtendedCrashInformation (Process &process) override
 Gather all of crash informations into a structured data dictionary.
 
 PlatformPOSIX (bool is_host)
 Default Constructor.
 
- Public Member Functions inherited from PlatformPOSIX
 PlatformPOSIX (bool is_host)
 Default Constructor.
 
 ~PlatformPOSIX () override
 Destructor.
 
lldb_private::OptionGroupOptionsGetConnectionOptions (lldb_private::CommandInterpreter &interpreter) override
 
lldb_private::Status PutFile (const lldb_private::FileSpec &source, const lldb_private::FileSpec &destination, uint32_t uid=UINT32_MAX, uint32_t gid=UINT32_MAX) override
 
lldb_private::Status GetFile (const lldb_private::FileSpec &source, const lldb_private::FileSpec &destination) override
 
const lldb::UnixSignalsSPGetRemoteUnixSignals () override
 
lldb::ProcessSP Attach (lldb_private::ProcessAttachInfo &attach_info, lldb_private::Debugger &debugger, lldb_private::Target *target, lldb_private::Status &error) override
 Attach to an existing process using a process ID.
 
lldb::ProcessSP DebugProcess (lldb_private::ProcessLaunchInfo &launch_info, lldb_private::Debugger &debugger, lldb_private::Target &target, lldb_private::Status &error) override
 Subclasses do not need to implement this function as it uses the Platform::LaunchProcess() followed by Platform::Attach ().
 
std::string GetPlatformSpecificConnectionInformation () override
 
void CalculateTrapHandlerSymbolNames () override
 Ask the Platform subclass to fill in the list of trap handler names.
 
lldb_private::Status ConnectRemote (lldb_private::Args &args) override
 
lldb_private::Status DisconnectRemote () override
 
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_image) override
 
lldb_private::Status UnloadImage (lldb_private::Process *process, uint32_t image_token) override
 
lldb_private::ConstString GetFullNameForDylib (lldb_private::ConstString basename) override
 
- Public Member Functions inherited from lldb_private::RemoteAwarePlatform
bool GetModuleSpec (const FileSpec &module_file_spec, const ArchSpec &arch, ModuleSpec &module_spec) override
 
Status ResolveExecutable (const ModuleSpec &module_spec, lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr) override
 Find a platform plugin for a given process.
 
lldb::user_id_t OpenFile (const FileSpec &file_spec, File::OpenOptions flags, uint32_t mode, Status &error) override
 
bool CloseFile (lldb::user_id_t fd, Status &error) override
 
uint64_t ReadFile (lldb::user_id_t fd, uint64_t offset, void *dst, uint64_t dst_len, Status &error) override
 
uint64_t WriteFile (lldb::user_id_t fd, uint64_t offset, const void *src, uint64_t src_len, Status &error) override
 
lldb::user_id_t GetFileSize (const FileSpec &file_spec) override
 
Status CreateSymlink (const FileSpec &src, const FileSpec &dst) override
 
bool GetFileExists (const FileSpec &file_spec) override
 
Status Unlink (const FileSpec &file_spec) override
 
FileSpec GetRemoteWorkingDirectory () override
 
bool SetRemoteWorkingDirectory (const FileSpec &working_dir) override
 
Status MakeDirectory (const FileSpec &file_spec, uint32_t mode) override
 
Status GetFilePermissions (const FileSpec &file_spec, uint32_t &file_permissions) override
 
Status SetFilePermissions (const FileSpec &file_spec, uint32_t file_permissions) override
 
llvm::ErrorOr< llvm::MD5::MD5Result > CalculateMD5 (const FileSpec &file_spec) override
 
Status GetFileWithUUID (const FileSpec &platform_file, const UUID *uuid, FileSpec &local_file) override
 Locate a file for a platform.
 
bool GetRemoteOSVersion () override
 
std::optional< std::string > GetRemoteOSBuildString () override
 
std::optional< std::string > GetRemoteOSKernelDescription () override
 
ArchSpec GetRemoteSystemArchitecture () override
 
Status RunShellCommand (llvm::StringRef command, const FileSpec &working_dir, int *status_ptr, int *signo_ptr, std::string *command_output, const Timeout< std::micro > &timeout) override
 
Status RunShellCommand (llvm::StringRef interpreter, llvm::StringRef command, const FileSpec &working_dir, int *status_ptr, int *signo_ptr, std::string *command_output, const Timeout< std::micro > &timeout) override
 
const char * GetHostname () override
 
UserIDResolverGetUserIDResolver () override
 
lldb_private::Environment GetEnvironment () override
 
bool IsConnected () const override
 
bool GetProcessInfo (lldb::pid_t pid, ProcessInstanceInfo &proc_info) override
 
uint32_t FindProcesses (const ProcessInstanceInfoMatch &match_info, ProcessInstanceInfoList &process_infos) override
 Attach to an existing process by process name.
 
lldb::ProcessSP ConnectProcess (llvm::StringRef connect_url, llvm::StringRef plugin_name, Debugger &debugger, Target *target, Status &error) override
 
Status LaunchProcess (ProcessLaunchInfo &launch_info) override
 Launch a new process on a platform, not necessarily for debugging, it could be just for running the process.
 
Status KillProcess (const lldb::pid_t pid) override
 Kill process on a platform.
 
size_t ConnectToWaitingProcesses (Debugger &debugger, Status &error) override
 Connect to all processes waiting for a debugger to attach.
 
 Platform (bool is_host_platform)
 Default Constructor.
 
- Public Member Functions inherited from lldb_private::Platform
 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 UserIDResolverGetUserIDResolver ()
 
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)
 
void CallLocateModuleCallbackIfSet (const ModuleSpec &module_spec, lldb::ModuleSP &module_sp, FileSpec &symbol_file_spec, 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< ArchSpecGetSupportedArchitectures (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.
 
ProcessInstanceInfoList GetAllProcesses ()
 
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 ArchSpecGetSystemArchitecture ()
 
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
 
const std::string & GetSDKRootDirectory () const
 
void SetSDKRootDirectory (std::string dir)
 
const std::string & GetSDKBuild () const
 
void SetSDKBuild (std::string 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::OptionGroupOptionsGetConnectionOptions (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 llvm::ErrorOr< llvm::MD5::MD5Result > CalculateMD5 (const FileSpec &file_spec)
 
virtual uint32_t GetResumeCountForLaunchInfo (ProcessLaunchInfo &launch_info)
 
virtual const lldb::UnixSignalsSPGetRemoteUnixSignals ()
 
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::DictionarySPFetchExtendedCrashInformation (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 ()
 
void SetLocateModuleCallback (LocateModuleCallback callback)
 Set locate module callback.
 
LocateModuleCallback GetLocateModuleCallback () const
 
- Public Member Functions inherited from lldb_private::PluginInterface
 PluginInterface ()=default
 
virtual ~PluginInterface ()=default
 
virtual llvm::StringRef GetPluginName ()=0
 
 PluginInterface (const PluginInterface &)=delete
 
PluginInterfaceoperator= (const PluginInterface &)=delete
 

Static Public Member Functions

static void Initialize ()
 
static void Terminate ()
 
static lldb::PlatformSP CreateInstance (const char *class_name, const char *description, ConstString plugin_name, llvm::SmallVector< llvm::Triple::ArchType, 4 > supported_arch, llvm::Triple::OSType preferred_os, llvm::SmallVector< llvm::Triple::OSType, 4 > supported_os, llvm::SmallVector< llvm::StringRef, 4 > supported_triples, std::string sdk_name_primary, std::string sdk_name_secondary, XcodeSDK::Type sdk_type, CoreSimulatorSupport::DeviceType::ProductFamilyID kind, bool force, const ArchSpec *arch)
 
- Static Public Member Functions inherited from lldb_private::PlatformDarwin
static lldb::PlatformSP CreateInstance (bool force, const ArchSpec *arch)
 
static void DebuggerInitialize (lldb_private::Debugger &debugger)
 
static void Initialize ()
 
static void Terminate ()
 
static llvm::StringRef GetPluginNameStatic ()
 
static llvm::StringRef GetDescriptionStatic ()
 
static std::tuple< llvm::VersionTuple, llvm::StringRef > ParseVersionBuildDir (llvm::StringRef str)
 
static FileSpec GetCurrentToolchainDirectory ()
 Return the toolchain directory the current LLDB instance is located in.
 
static FileSpec GetCurrentCommandLineToolsDirectory ()
 Return the command line tools directory the current LLDB instance is located in.
 
static llvm::Expected< std::pair< XcodeSDK, bool > > GetSDKPathFromDebugInfo (Module &module)
 Search each CU associated with the specified 'module' for the SDK paths the CUs were compiled against.
 
static llvm::Expected< std::string > ResolveSDKPathFromDebugInfo (Module &module)
 Returns the full path of the most appropriate SDK for the specified 'module'.
 
- Static Public Member Functions inherited from lldb_private::Platform
static void Initialize ()
 
static void Terminate ()
 
static PlatformPropertiesGetGlobalPlatformProperties ()
 
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 Member Functions

FileSpec GetCoreSimulatorPath ()
 
llvm::StringRef GetSDKFilepath ()
 
void LoadCoreSimulator ()
 
- Protected Member Functions inherited from lldb_private::PlatformDarwin
StructuredData::ArraySP ExtractCrashInfoAnnotations (Process &process)
 Extract the __crash_info annotations from each of the target's modules.
 
StructuredData::DictionarySP ExtractAppSpecificInfo (Process &process)
 Extract the Application Specific Information messages from a crash report.
 
void ReadLibdispatchOffsetsAddress (Process *process)
 
void ReadLibdispatchOffsets (Process *process)
 
virtual bool CheckLocalSharedCache () const
 
void AddClangModuleCompilationOptionsForSDKType (Target *target, std::vector< std::string > &options, XcodeSDK::Type sdk_type)
 
Status FindBundleBinaryInExecSearchPaths (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)
 
- Protected Member Functions inherited from PlatformPOSIX
lldb_private::Status EvaluateLibdlExpression (lldb_private::Process *process, const char *expr_cstr, llvm::StringRef expr_prefix, lldb::ValueObjectSP &result_valobj_sp)
 
std::unique_ptr< lldb_private::UtilityFunctionMakeLoadImageUtilityFunction (lldb_private::ExecutionContext &exe_ctx, lldb_private::Status &error)
 
virtual llvm::StringRef GetLibdlFunctionDeclarations (lldb_private::Process *process)
 
- Protected Member Functions inherited from lldb_private::Platform
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)
 

Protected Attributes

const char * m_class_name
 
const char * m_description
 
ConstString m_plugin_name
 
std::mutex m_core_sim_path_mutex
 
std::optional< FileSpecm_core_simulator_framework_path
 
std::optional< CoreSimulatorSupport::Devicem_device
 
CoreSimulatorSupport::DeviceType::ProductFamilyID m_kind
 
llvm::Triple::OSType m_os_type = llvm::Triple::UnknownOS
 
llvm::SmallVector< llvm::StringRef, 4 > m_supported_triples = {}
 
std::string m_sdk_name_primary
 
std::string m_sdk_name_secondary
 
bool m_have_searched_for_sdk = false
 
llvm::StringRef m_sdk
 
XcodeSDK::Type m_sdk_type
 
- Protected Attributes inherited from lldb_private::PlatformDarwin
std::string m_developer_directory
 
llvm::StringMap< std::string > m_sdk_path
 
std::mutex m_sdk_path_mutex
 
- Protected Attributes inherited from PlatformPOSIX
std::unique_ptr< lldb_private::OptionGroupPlatformRSyncm_option_group_platform_rsync
 
std::unique_ptr< lldb_private::OptionGroupPlatformSSHm_option_group_platform_ssh
 
std::unique_ptr< lldb_private::OptionGroupPlatformCachingm_option_group_platform_caching
 
std::map< lldb_private::CommandInterpreter *, std::unique_ptr< lldb_private::OptionGroupOptions > > m_options
 
- Protected Attributes inherited from lldb_private::RemoteAwarePlatform
lldb::PlatformSP m_remote_platform_sp
 
- Protected Attributes inherited from lldb_private::Platform
bool m_is_host
 
bool m_os_version_set_while_connected
 
bool m_system_arch_set_while_connected
 
std::string m_sdk_sysroot
 
std::string 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< ConstStringm_trap_handlers
 
bool m_calculated_trap_handlers
 
const std::unique_ptr< ModuleCachem_module_cache
 
LocateModuleCallback m_locate_module_callback
 

Private Member Functions

 PlatformAppleSimulator (const PlatformAppleSimulator &)=delete
 
const PlatformAppleSimulatoroperator= (const PlatformAppleSimulator &)=delete
 
Status GetSymbolFile (const FileSpec &platform_file, const UUID *uuid_ptr, FileSpec &local_file)
 

Additional Inherited Members

- Public Types inherited from lldb_private::Platform
typedef std::function< Status(const ModuleSpec &module_spec, FileSpec &module_file_spec, FileSpec &symbol_file_spec)> LocateModuleCallback
 
- Protected Types inherited from lldb_private::Platform
typedef std::map< uint32_t, ConstStringIDToNameMap
 
- Static Protected Member Functions inherited from lldb_private::PlatformDarwin
static const char * GetCompatibleArch (ArchSpec::Core core, size_t idx)
 
static FileSystem::EnumerateDirectoryResult DirectoryEnumerator (void *baton, llvm::sys::fs::file_type file_type, llvm::StringRef path)
 
static FileSpec FindSDKInXcodeForModules (XcodeSDK::Type sdk_type, const FileSpec &sdks_spec)
 
static FileSpec GetSDKDirectoryForModules (XcodeSDK::Type sdk_type)
 
static std::string FindComponentInPath (llvm::StringRef path, llvm::StringRef component)
 
static llvm::Triple::OSType GetHostOSType ()
 
- Static Protected Member Functions inherited from lldb_private::Platform
static std::vector< ArchSpecCreateArchList (llvm::ArrayRef< llvm::Triple::ArchType > archs, llvm::Triple::OSType os)
 Create a list of ArchSpecs with the given OS and a architectures.
 

Detailed Description

Definition at line 40 of file PlatformAppleSimulator.h.

Constructor & Destructor Documentation

◆ PlatformAppleSimulator() [1/2]

PlatformAppleSimulator::PlatformAppleSimulator ( const char *  class_name,
const char *  description,
ConstString  plugin_name,
llvm::Triple::OSType  preferred_os,
llvm::SmallVector< llvm::StringRef, 4 >  supported_triples,
std::string  sdk_name_primary,
std::string  sdk_name_secondary,
XcodeSDK::Type  sdk_type,
CoreSimulatorSupport::DeviceType::ProductFamilyID  kind 
)

Default Constructor.

Definition at line 40 of file PlatformAppleSimulator.cpp.

◆ ~PlatformAppleSimulator()

PlatformAppleSimulator::~PlatformAppleSimulator ( )
overridedefault

Destructor.

The destructor is virtual since this class is designed to be inherited from by the plug-in instance.

◆ PlatformAppleSimulator() [2/2]

lldb_private::PlatformAppleSimulator::PlatformAppleSimulator ( const PlatformAppleSimulator )
privatedelete

Member Function Documentation

◆ AddClangModuleCompilationOptions()

void lldb_private::PlatformAppleSimulator::AddClangModuleCompilationOptions ( Target target,
std::vector< std::string > &  options 
)
inlineoverridevirtual

◆ ConnectRemote()

Status PlatformAppleSimulator::ConnectRemote ( Args args)
overridevirtual

◆ CreateInstance()

PlatformSP PlatformAppleSimulator::CreateInstance ( const char *  class_name,
const char *  description,
ConstString  plugin_name,
llvm::SmallVector< llvm::Triple::ArchType, 4 >  supported_arch,
llvm::Triple::OSType  preferred_os,
llvm::SmallVector< llvm::Triple::OSType, 4 >  supported_os,
llvm::SmallVector< llvm::StringRef, 4 >  supported_triples,
std::string  sdk_name_primary,
std::string  sdk_name_secondary,
XcodeSDK::Type  sdk_type,
CoreSimulatorSupport::DeviceType::ProductFamilyID  kind,
bool  force,
const ArchSpec arch 
)
static

◆ DebugProcess()

lldb::ProcessSP PlatformAppleSimulator::DebugProcess ( ProcessLaunchInfo launch_info,
Debugger debugger,
Target target,
Status error 
)
overridevirtual

◆ DisconnectRemote()

Status PlatformAppleSimulator::DisconnectRemote ( )
overridevirtual

Reimplemented from lldb_private::Platform.

Definition at line 175 of file PlatformAppleSimulator.cpp.

References m_device, lldb_private::Status::SetErrorString(), and UNSUPPORTED_ERROR.

Referenced by ConnectRemote().

◆ FindProcesses()

uint32_t PlatformAppleSimulator::FindProcesses ( const ProcessInstanceInfoMatch match_info,
ProcessInstanceInfoList proc_infos 
)
overridevirtual

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.

Parameters
[in]process_nameA process name to match against the current process list.
Returns
Returns pid if attaching was successful, or LLDB_INVALID_PROCESS_ID if attaching fails.

Reimplemented from lldb_private::RemoteAwarePlatform.

Definition at line 523 of file PlatformAppleSimulator.cpp.

References lldb_private::Host::FindProcesses(), lldb_private::ProcessInfo::GetArchitecture(), lldb_private::ArchSpec::GetTriple(), and m_os_type.

◆ GetCoreSimulatorPath()

FileSpec PlatformAppleSimulator::GetCoreSimulatorPath ( )
protected

◆ GetDescription()

llvm::StringRef lldb_private::PlatformAppleSimulator::GetDescription ( )
inlineoverridevirtual

Implements lldb_private::Platform.

Definition at line 73 of file PlatformAppleSimulator.h.

References m_description.

◆ GetPluginName()

llvm::StringRef lldb_private::PlatformAppleSimulator::GetPluginName ( )
inlineoverridevirtual

◆ GetSDKFilepath()

llvm::StringRef PlatformAppleSimulator::GetSDKFilepath ( )
protected

◆ GetSharedModule()

Status PlatformAppleSimulator::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 
)
overridevirtual
Parameters
[in]module_specThe ModuleSpec of a binary to find.
[in]processA Process.
[out]module_spA Module that matches the ModuleSpec, if one is found.
[in]module_search_paths_ptrLocations to possibly look for a binary that matches the ModuleSpec.
[out]old_modulesExisting Modules in the Process' Target image list which match the FileSpec.
[out]did_create_ptrOptional boolean, nullptr may be passed for this argument. If this method is returning a new ModuleSP, this will be set to true. If this method is returning a ModuleSP that is already in the Target's image list, it will be false.
Returns
The Status object for any errors found while searching for the binary.

Reimplemented from lldb_private::Platform.

Definition at line 495 of file PlatformAppleSimulator.cpp.

References error(), lldb_private::ModuleSpec::GetFileSpec(), lldb_private::ModuleList::GetSharedModule(), GetSymbolFile(), lldb_private::ModuleSpec::GetUUIDPtr(), and ResolveExecutable().

◆ GetStatus()

void PlatformAppleSimulator::GetStatus ( Stream strm)
overridevirtual

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 from lldb_private::Platform.

Definition at line 87 of file PlatformAppleSimulator.cpp.

References CoreSimulatorSupport::Device::Booted, CoreSimulatorSupport::DeviceSet::GetAvailableDevices(), CoreSimulatorSupport::DeviceSet::GetDeviceAtIndex(), CoreSimulatorSupport::Device::GetName(), CoreSimulatorSupport::DeviceSet::GetNumDevices(), GetSDKFilepath(), lldb_private::Platform::GetStatus(), CoreSimulatorSupport::Device::GetUDID(), LoadCoreSimulator(), m_device, lldb_private::Stream::Printf(), and UNSUPPORTED_ERROR.

◆ GetSupportedArchitectures()

std::vector< ArchSpec > PlatformAppleSimulator::GetSupportedArchitectures ( const ArchSpec process_host_arch)
overridevirtual

Get the platform's supported architectures in the order in which they should be searched.

Parameters
[in]process_host_archThe process host architecture if it's known. An invalid ArchSpec represents that the process host architecture is unknown.

Implements lldb_private::Platform.

Definition at line 275 of file PlatformAppleSimulator.cpp.

References m_supported_triples.

Referenced by ResolveExecutable().

◆ GetSymbolFile()

Status PlatformAppleSimulator::GetSymbolFile ( const FileSpec platform_file,
const UUID uuid_ptr,
FileSpec local_file 
)
private

◆ Initialize()

void PlatformAppleSimulator::Initialize ( )
static

◆ LaunchProcess()

lldb_private::Status PlatformAppleSimulator::LaunchProcess ( lldb_private::ProcessLaunchInfo launch_info)
overridevirtual

◆ LoadCoreSimulator()

void PlatformAppleSimulator::LoadCoreSimulator ( )
protected

Definition at line 246 of file PlatformAppleSimulator.cpp.

References GetCoreSimulatorPath().

Referenced by ConnectRemote(), GetStatus(), and LaunchProcess().

◆ operator=()

const PlatformAppleSimulator & lldb_private::PlatformAppleSimulator::operator= ( const PlatformAppleSimulator )
privatedelete

◆ ResolveExecutable()

Status PlatformAppleSimulator::ResolveExecutable ( const ModuleSpec module_spec,
lldb::ModuleSP module_sp,
const FileSpecList module_search_paths_ptr 
)
overridevirtual

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

Parameters
[in]processThe process for which to try and locate a platform plug-in instance.
[in]plugin_nameAn 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.

Returns
Returns true if this Platform plug-in was able to find a suitable executable, false otherwise.

Reimplemented from lldb_private::RemoteAwarePlatform.

Definition at line 386 of file PlatformAppleSimulator.cpp.

References error(), lldb_private::ModuleSpec::GetArchitecture(), lldb_private::ArchSpec::GetArchitectureName(), lldb_private::ArchSpec::GetCore(), lldb_private::ModuleSpec::GetFileSpec(), lldb_private::FileSpec::GetPath(), GetPluginName(), lldb_private::ModuleList::GetSharedModule(), lldb_private::StreamString::GetString(), GetSupportedArchitectures(), lldb_private::FileSystem::Instance(), lldb_private::ArchSpec::IsValid(), and lldb_private::Host::ResolveExecutableInBundle().

Referenced by GetSharedModule().

◆ Terminate()

void PlatformAppleSimulator::Terminate ( )
static

Member Data Documentation

◆ m_class_name

const char* lldb_private::PlatformAppleSimulator::m_class_name
protected

Definition at line 111 of file PlatformAppleSimulator.h.

◆ m_core_sim_path_mutex

std::mutex lldb_private::PlatformAppleSimulator::m_core_sim_path_mutex
protected

Definition at line 114 of file PlatformAppleSimulator.h.

Referenced by GetCoreSimulatorPath().

◆ m_core_simulator_framework_path

std::optional<FileSpec> lldb_private::PlatformAppleSimulator::m_core_simulator_framework_path
protected

Definition at line 115 of file PlatformAppleSimulator.h.

Referenced by GetCoreSimulatorPath().

◆ m_description

const char* lldb_private::PlatformAppleSimulator::m_description
protected

Definition at line 112 of file PlatformAppleSimulator.h.

Referenced by GetDescription().

◆ m_device

std::optional<CoreSimulatorSupport::Device> lldb_private::PlatformAppleSimulator::m_device
protected

Definition at line 116 of file PlatformAppleSimulator.h.

Referenced by ConnectRemote(), DisconnectRemote(), and GetStatus().

◆ m_have_searched_for_sdk

bool lldb_private::PlatformAppleSimulator::m_have_searched_for_sdk = false
protected

Definition at line 127 of file PlatformAppleSimulator.h.

Referenced by GetSDKFilepath().

◆ m_kind

CoreSimulatorSupport::DeviceType::ProductFamilyID lldb_private::PlatformAppleSimulator::m_kind
protected

Definition at line 117 of file PlatformAppleSimulator.h.

◆ m_os_type

llvm::Triple::OSType lldb_private::PlatformAppleSimulator::m_os_type = llvm::Triple::UnknownOS
protected

Definition at line 123 of file PlatformAppleSimulator.h.

Referenced by FindProcesses().

◆ m_plugin_name

ConstString lldb_private::PlatformAppleSimulator::m_plugin_name
protected

Definition at line 113 of file PlatformAppleSimulator.h.

Referenced by GetPluginName().

◆ m_sdk

llvm::StringRef lldb_private::PlatformAppleSimulator::m_sdk
protected

Definition at line 128 of file PlatformAppleSimulator.h.

Referenced by GetSDKFilepath().

◆ m_sdk_name_primary

std::string lldb_private::PlatformAppleSimulator::m_sdk_name_primary
protected

Definition at line 125 of file PlatformAppleSimulator.h.

Referenced by GetSDKFilepath().

◆ m_sdk_name_secondary

std::string lldb_private::PlatformAppleSimulator::m_sdk_name_secondary
protected

Definition at line 126 of file PlatformAppleSimulator.h.

Referenced by GetSDKFilepath().

◆ m_sdk_type

XcodeSDK::Type lldb_private::PlatformAppleSimulator::m_sdk_type
protected

Definition at line 129 of file PlatformAppleSimulator.h.

Referenced by AddClangModuleCompilationOptions().

◆ m_supported_triples

llvm::SmallVector<llvm::StringRef, 4> lldb_private::PlatformAppleSimulator::m_supported_triples = {}
protected

Definition at line 124 of file PlatformAppleSimulator.h.

Referenced by GetSupportedArchitectures().


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