LLDB mainline
lldb_private::HostInfoMacOSX Class Reference

#include <HostInfoMacOSX.h>

Inheritance diagram for lldb_private::HostInfoMacOSX:
[legend]

Static Public Member Functions

static llvm::VersionTuple GetOSVersion ()
static llvm::VersionTuple GetMacCatalystVersion ()
static std::optional< std::string > GetOSBuildString ()
static FileSpec GetProgramFileSpec ()
static FileSpec GetXcodeContentsDirectory ()
static FileSpec GetXcodeDeveloperDirectory ()
static FileSpec GetCurrentXcodeToolchainDirectory ()
static FileSpec GetCurrentCommandLineToolsDirectory ()
static llvm::Expected< llvm::StringRef > GetSDKRoot (SDKOptions options)
 Query xcrun to find an Xcode SDK directory.
static llvm::Expected< llvm::StringRef > FindSDKTool (XcodeSDK sdk, llvm::StringRef tool)
static SharedCacheImageInfo GetSharedCacheImageInfo (llvm::StringRef image_name)
 Shared cache utilities.
Static Public Member Functions inherited from lldb_private::HostInfoPosix
static size_t GetPageSize ()
static bool GetHostname (std::string &s)
static std::optional< std::string > GetOSKernelDescription ()
static uint32_t GetUserID ()
static uint32_t GetGroupID ()
static uint32_t GetEffectiveUserID ()
static uint32_t GetEffectiveGroupID ()
static FileSpec GetDefaultShell ()
static bool GetEnvironmentVar (const std::string &var_name, std::string &var)
static UserIDResolverGetUserIDResolver ()
static llvm::VersionTuple GetOSVersion ()
static std::optional< std::string > GetOSBuildString ()
static llvm::Expected< llvm::StringRef > GetSDKRoot (SDKOptions options)
 The SDK is the directory where the system C headers, libraries, can be found.
Static Public Member Functions inherited from lldb_private::HostInfoBase
static void Initialize (SharedLibraryDirectoryHelper *helper=nullptr)
static void Terminate ()
static llvm::Triple GetTargetTriple ()
 Gets the host target triple.
static const ArchSpecGetArchitecture (ArchitectureKind arch_kind=eArchKindDefault)
static std::optional< ArchitectureKindParseArchitectureKind (llvm::StringRef kind)
static FileSpec GetShlibDir ()
 Returns the directory containing the lldb shared library.
static FileSpec GetSupportExeDir ()
 Returns the directory containing the support executables (debugserver, ...).
static FileSpec GetHeaderDir ()
 Returns the directory containing the lldb headers.
static FileSpec GetSystemPluginDir ()
 Returns the directory containing the system plugins.
static FileSpec GetUserHomeDir ()
 Returns the directory containing the users home (e.g.
static FileSpec GetUserLLDBDir ()
 Returns the directory containing the users lldb home (e.g.
static FileSpec GetUserPluginDir ()
 Returns the directory containing the user plugins.
static FileSpec GetProcessTempDir ()
 Returns the process temporary directory.
static FileSpec GetGlobalTempDir ()
 Returns the global temporary directory.
static ArchSpec GetAugmentedArchSpec (llvm::StringRef triple)
 If the triple does not specify the vendor, os, and environment parts, we "augment" these using information from the host and return the resulting ArchSpec object.
static bool ComputePathRelativeToLibrary (FileSpec &file_spec, llvm::StringRef dir)
static FileSpec GetXcodeContentsDirectory ()
static FileSpec GetXcodeDeveloperDirectory ()
static FileSpec GetCurrentXcodeToolchainDirectory ()
static FileSpec GetCurrentCommandLineToolsDirectory ()
static llvm::Expected< llvm::StringRef > GetSDKRoot (SDKOptions options)
 Return the directory containing something like a SDK (reused for Swift).
static llvm::Expected< llvm::StringRef > FindSDKTool (XcodeSDK sdk, llvm::StringRef tool)
 Return the path to a specific tool in the specified Xcode SDK.
static SharedCacheImageInfo GetSharedCacheImageInfo (llvm::StringRef image_name)
 Return information about module image_name if it is loaded in the current process's address space.
static llvm::StringRef GetDistributionId ()
 Returns the distribution id of the host.

Static Protected Member Functions

static bool ComputeSupportExeDirectory (FileSpec &file_spec)
static void ComputeHostArchitectureSupport (ArchSpec &arch_32, ArchSpec &arch_64)
static bool ComputeHeaderDirectory (FileSpec &file_spec)
static bool ComputeSystemPluginsDirectory (FileSpec &file_spec)
static bool ComputeUserPluginsDirectory (FileSpec &file_spec)
static std::string FindComponentInPath (llvm::StringRef path, llvm::StringRef component)
Static Protected Member Functions inherited from lldb_private::HostInfoPosix
static bool ComputeSupportExeDirectory (FileSpec &file_spec)
static bool ComputeHeaderDirectory (FileSpec &file_spec)
static bool ComputeSystemPluginsDirectory (FileSpec &file_spec)
static bool ComputeUserPluginsDirectory (FileSpec &file_spec)
Static Protected Member Functions inherited from lldb_private::HostInfoBase
static bool ComputeSharedLibraryDirectory (FileSpec &file_spec)
static bool ComputeSupportExeDirectory (FileSpec &file_spec)
static bool ComputeProcessTempFileDirectory (FileSpec &file_spec)
static bool ComputeGlobalTempFileDirectory (FileSpec &file_spec)
static bool ComputeTempFileBaseDirectory (FileSpec &file_spec)
static bool ComputeHeaderDirectory (FileSpec &file_spec)
static bool ComputeSystemPluginsDirectory (FileSpec &file_spec)
static bool ComputeUserHomeDirectory (FileSpec &file_spec)
static bool ComputeUserLLDBHomeDirectory (FileSpec &file_spec)
static bool ComputeUserPluginsDirectory (FileSpec &file_spec)
static void ComputeHostArchitectureSupport (ArchSpec &arch_32, ArchSpec &arch_64)

Friends

class HostInfoBase

Additional Inherited Members

Public Types inherited from lldb_private::HostInfoBase
enum  ArchitectureKind { eArchKindDefault , eArchKind32 , eArchKind64 }
using SharedLibraryDirectoryHelper = void(FileSpec &this_file)
 A helper function for determining the liblldb location.

Detailed Description

Definition at line 23 of file HostInfoMacOSX.h.

Member Function Documentation

◆ ComputeHeaderDirectory()

bool HostInfoMacOSX::ComputeHeaderDirectory ( FileSpec & file_spec)
staticprotected

◆ ComputeHostArchitectureSupport()

void HostInfoMacOSX::ComputeHostArchitectureSupport ( ArchSpec & arch_32,
ArchSpec & arch_64 )
staticprotected

◆ ComputeSupportExeDirectory()

◆ ComputeSystemPluginsDirectory()

bool HostInfoMacOSX::ComputeSystemPluginsDirectory ( FileSpec & file_spec)
staticprotected

◆ ComputeUserPluginsDirectory()

◆ FindComponentInPath()

std::string HostInfoMacOSX::FindComponentInPath ( llvm::StringRef path,
llvm::StringRef component )
staticprotected

◆ FindSDKTool()

llvm::Expected< llvm::StringRef > HostInfoMacOSX::FindSDKTool ( XcodeSDK sdk,
llvm::StringRef tool )
static

◆ GetCurrentCommandLineToolsDirectory()

FileSpec HostInfoMacOSX::GetCurrentCommandLineToolsDirectory ( )
static

Definition at line 417 of file HostInfoMacOSX.mm.

References FindComponentInPath().

◆ GetCurrentXcodeToolchainDirectory()

FileSpec HostInfoMacOSX::GetCurrentXcodeToolchainDirectory ( )
static

Definition at line 411 of file HostInfoMacOSX.mm.

References FindComponentInPath().

◆ GetMacCatalystVersion()

llvm::VersionTuple HostInfoMacOSX::GetMacCatalystVersion ( )
static

Definition at line 96 of file HostInfoMacOSX.mm.

References ParseOSVersion().

◆ GetOSBuildString()

std::optional< std::string > HostInfoMacOSX::GetOSBuildString ( )
static

Definition at line 68 of file HostInfoMacOSX.mm.

References PATH_MAX.

◆ GetOSVersion()

llvm::VersionTuple HostInfoMacOSX::GetOSVersion ( )
static

Definition at line 89 of file HostInfoMacOSX.mm.

References ParseOSVersion().

◆ GetProgramFileSpec()

FileSpec HostInfoMacOSX::GetProgramFileSpec ( )
static

Definition at line 104 of file HostInfoMacOSX.mm.

References PATH_MAX, and lldb_private::FileSpec::SetFile().

◆ GetSDKRoot()

llvm::Expected< llvm::StringRef > HostInfoMacOSX::GetSDKRoot ( SDKOptions options)
static

Query xcrun to find an Xcode SDK directory.

Note, this is an expensive operation if the SDK we're querying does not exist in an Xcode installation path on the host.

Definition at line 603 of file HostInfoMacOSX.mm.

References find_cached_path(), lldb_private::XcodeSDK::GetString(), GetXcodeSDK(), and lldb_private::HostInfoBase::SDKOptions::XcodeSDKSelection.

◆ GetSharedCacheImageInfo()

SharedCacheImageInfo HostInfoMacOSX::GetSharedCacheImageInfo ( llvm::StringRef image_name)
static

Shared cache utilities.

Definition at line 742 of file HostInfoMacOSX.mm.

◆ GetXcodeContentsDirectory()

◆ GetXcodeDeveloperDirectory()

lldb_private::FileSpec HostInfoMacOSX::GetXcodeDeveloperDirectory ( )
static

◆ HostInfoBase

friend class HostInfoBase
friend

Definition at line 24 of file HostInfoMacOSX.h.

References HostInfoBase.

Referenced by HostInfoBase.


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