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

#include <HostInfoBase.h>

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

Public Types

enum  ArchitectureKind { eArchKindDefault, eArchKind32, eArchKind64 }
 
using SharedLibraryDirectoryHelper = void(FileSpec &this_file)
 A helper function for determining the liblldb location. More...
 

Static Public Member Functions

static void Initialize (SharedLibraryDirectoryHelper *helper=nullptr)
 
static void Terminate ()
 
static llvm::Triple GetTargetTriple ()
 Gets the host target triple. More...
 
static const ArchSpecGetArchitecture (ArchitectureKind arch_kind=eArchKindDefault)
 
static llvm::Optional< ArchitectureKindParseArchitectureKind (llvm::StringRef kind)
 
static FileSpec GetShlibDir ()
 Returns the directory containing the lldb shared library. More...
 
static FileSpec GetSupportExeDir ()
 Returns the directory containing the support executables (debugserver, ...). More...
 
static FileSpec GetHeaderDir ()
 Returns the directory containing the lldb headers. More...
 
static FileSpec GetSystemPluginDir ()
 Returns the directory containing the system plugins. More...
 
static FileSpec GetUserPluginDir ()
 Returns the directory containing the user plugins. More...
 
static FileSpec GetProcessTempDir ()
 Returns the proces temporary directory. More...
 
static FileSpec GetGlobalTempDir ()
 Returns the global temporary directory. More...
 
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. More...
 
static bool ComputePathRelativeToLibrary (FileSpec &file_spec, llvm::StringRef dir)
 
static FileSpec GetXcodeContentsDirectory ()
 
static FileSpec GetXcodeDeveloperDirectory ()
 
static llvm::StringRef GetXcodeSDKPath (XcodeSDK sdk)
 Return the directory containing a specific Xcode SDK. More...
 
static SharedCacheImageInfo GetSharedCacheImageInfo (llvm::StringRef image_name)
 Return information about module image_name if it is loaded in the current process's address space. More...
 

Static Protected Member Functions

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 ComputeUserPluginsDirectory (FileSpec &file_spec)
 
static void ComputeHostArchitectureSupport (ArchSpec &arch_32, ArchSpec &arch_64)
 

Private Member Functions

 HostInfoBase ()=default
 
 ~HostInfoBase ()=default
 

Detailed Description

Definition at line 33 of file HostInfoBase.h.

Member Typedef Documentation

◆ SharedLibraryDirectoryHelper

A helper function for determining the liblldb location.

It receives a FileSpec with the location of file containing this code. It can (optionally) replace it with a file spec pointing to a more canonical copy.

Definition at line 44 of file HostInfoBase.h.

Member Enumeration Documentation

◆ ArchitectureKind

Enumerator
eArchKindDefault 
eArchKind32 
eArchKind64 

Definition at line 55 of file HostInfoBase.h.

Constructor & Destructor Documentation

◆ HostInfoBase()

lldb_private::HostInfoBase::HostInfoBase ( )
privatedefault

◆ ~HostInfoBase()

lldb_private::HostInfoBase::~HostInfoBase ( )
privatedefault

Member Function Documentation

◆ ComputeGlobalTempFileDirectory()

bool HostInfoBase::ComputeGlobalTempFileDirectory ( FileSpec file_spec)
staticprotected

◆ ComputeHeaderDirectory()

bool HostInfoBase::ComputeHeaderDirectory ( FileSpec file_spec)
staticprotected

Definition at line 303 of file HostInfoBase.cpp.

◆ ComputeHostArchitectureSupport()

void HostInfoBase::ComputeHostArchitectureSupport ( ArchSpec arch_32,
ArchSpec arch_64 
)
staticprotected

◆ ComputePathRelativeToLibrary()

bool HostInfoBase::ComputePathRelativeToLibrary ( FileSpec file_spec,
llvm::StringRef  dir 
)
static

◆ ComputeProcessTempFileDirectory()

bool HostInfoBase::ComputeProcessTempFileDirectory ( FileSpec file_spec)
staticprotected

◆ ComputeSharedLibraryDirectory()

bool HostInfoBase::ComputeSharedLibraryDirectory ( FileSpec file_spec)
staticprotected

Definition at line 243 of file HostInfoBase.cpp.

References g_shlib_dir_helper, and lldb_private::FileSpec::GetDirectory().

◆ ComputeSupportExeDirectory()

bool HostInfoBase::ComputeSupportExeDirectory ( FileSpec file_spec)
staticprotected

Definition at line 261 of file HostInfoBase.cpp.

◆ ComputeSystemPluginsDirectory()

bool HostInfoBase::ComputeSystemPluginsDirectory ( FileSpec file_spec)
staticprotected

Definition at line 309 of file HostInfoBase.cpp.

◆ ComputeTempFileBaseDirectory()

bool HostInfoBase::ComputeTempFileBaseDirectory ( FileSpec file_spec)
staticprotected

Definition at line 280 of file HostInfoBase.cpp.

References string().

Referenced by lldb_private::HostInfoAndroid::ComputeTempFileBaseDirectory().

◆ ComputeUserPluginsDirectory()

bool HostInfoBase::ComputeUserPluginsDirectory ( FileSpec file_spec)
staticprotected

Definition at line 315 of file HostInfoBase.cpp.

◆ GetArchitecture()

const ArchSpec & HostInfoBase::GetArchitecture ( ArchitectureKind  arch_kind = eArchKindDefault)
static

Definition at line 93 of file HostInfoBase.cpp.

References g_fields.

◆ GetAugmentedArchSpec()

ArchSpec HostInfoBase::GetAugmentedArchSpec ( llvm::StringRef  triple)
static

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.

Definition at line 191 of file HostInfoBase.cpp.

◆ GetGlobalTempDir()

FileSpec HostInfoBase::GetGlobalTempDir ( )
static

Returns the global temporary directory.

This directory will not be cleaned up when this process exits. Only the directory member of the FileSpec is filled in.

Definition at line 180 of file HostInfoBase.cpp.

References g_fields.

◆ GetHeaderDir()

FileSpec HostInfoBase::GetHeaderDir ( )
static

Returns the directory containing the lldb headers.

Only the directory member of the FileSpec is filled in.

Definition at line 138 of file HostInfoBase.cpp.

References g_fields.

◆ GetProcessTempDir()

FileSpec HostInfoBase::GetProcessTempDir ( )
static

Returns the proces temporary directory.

This directory will be cleaned up when this process exits. Only the directory member of the FileSpec is filled in.

Definition at line 169 of file HostInfoBase.cpp.

References g_fields.

◆ GetSharedCacheImageInfo()

static SharedCacheImageInfo lldb_private::HostInfoBase::GetSharedCacheImageInfo ( llvm::StringRef  image_name)
inlinestatic

Return information about module image_name if it is loaded in the current process's address space.

Definition at line 116 of file HostInfoBase.h.

◆ GetShlibDir()

FileSpec HostInfoBase::GetShlibDir ( )
static

Returns the directory containing the lldb shared library.

Only the directory member of the FileSpec is filled in.

Definition at line 118 of file HostInfoBase.cpp.

References g_fields.

Referenced by lldb_private::HostInfoMacOSX::ComputeHeaderDirectory(), lldb_private::HostInfoMacOSX::ComputeSupportExeDirectory(), and lldb_private::HostInfoMacOSX::ComputeSystemPluginsDirectory().

◆ GetSupportExeDir()

FileSpec HostInfoBase::GetSupportExeDir ( )
static

Returns the directory containing the support executables (debugserver, ...).

Only the directory member of the FileSpec is filled in.

Definition at line 128 of file HostInfoBase.cpp.

References g_fields.

◆ GetSystemPluginDir()

FileSpec HostInfoBase::GetSystemPluginDir ( )
static

Returns the directory containing the system plugins.

Only the directory member of the FileSpec is filled in.

Definition at line 148 of file HostInfoBase.cpp.

References g_fields.

◆ GetTargetTriple()

llvm::Triple HostInfoBase::GetTargetTriple ( )
static

Gets the host target triple.

Returns
The host target triple.

Definition at line 85 of file HostInfoBase.cpp.

References g_fields.

◆ GetUserPluginDir()

FileSpec HostInfoBase::GetUserPluginDir ( )
static

Returns the directory containing the user plugins.

Only the directory member of the FileSpec is filled in.

Definition at line 159 of file HostInfoBase.cpp.

References g_fields.

◆ GetXcodeContentsDirectory()

static FileSpec lldb_private::HostInfoBase::GetXcodeContentsDirectory ( )
inlinestatic

Definition at line 107 of file HostInfoBase.h.

◆ GetXcodeDeveloperDirectory()

static FileSpec lldb_private::HostInfoBase::GetXcodeDeveloperDirectory ( )
inlinestatic

Definition at line 108 of file HostInfoBase.h.

◆ GetXcodeSDKPath()

static llvm::StringRef lldb_private::HostInfoBase::GetXcodeSDKPath ( XcodeSDK  sdk)
inlinestatic

Return the directory containing a specific Xcode SDK.

Definition at line 111 of file HostInfoBase.h.

◆ Initialize()

void HostInfoBase::Initialize ( SharedLibraryDirectoryHelper helper = nullptr)
static

◆ ParseArchitectureKind()

llvm::Optional< HostInfoBase::ArchitectureKind > HostInfoBase::ParseArchitectureKind ( llvm::StringRef  kind)
static

◆ Terminate()

void HostInfoBase::Terminate ( )
static

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