LLDB mainline
|
#include <HostInfoBase.h>
Classes | |
struct | SDKOptions |
Public Types | |
enum | ArchitectureKind { eArchKindDefault , eArchKind32 , eArchKind64 } |
using | SharedLibraryDirectoryHelper = void(FileSpec &this_file) |
A helper function for determining the liblldb location. | |
Static Public Member Functions | |
static void | Initialize (SharedLibraryDirectoryHelper *helper=nullptr) |
static void | Terminate () |
static llvm::Triple | GetTargetTriple () |
Gets the host target triple. | |
static const ArchSpec & | GetArchitecture (ArchitectureKind arch_kind=eArchKindDefault) |
static std::optional< ArchitectureKind > | ParseArchitectureKind (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 | GetUserPluginDir () |
Returns the directory containing the user plugins. | |
static FileSpec | GetProcessTempDir () |
Returns the proces 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 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 | 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 | |
Definition at line 52 of file HostInfoBase.h.
using lldb_private::HostInfoBase::SharedLibraryDirectoryHelper = void(FileSpec &this_file) |
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 63 of file HostInfoBase.h.
Enumerator | |
---|---|
eArchKindDefault | |
eArchKind32 | |
eArchKind64 |
Definition at line 74 of file HostInfoBase.h.
|
privatedefault |
|
privatedefault |
|
staticprotected |
Definition at line 292 of file HostInfoBase.cpp.
References lldb_private::FileSpec::AppendPathComponent(), lldb_private::FileSpec::Clear(), lldb_private::FileSpec::GetPath(), lldb_private::FileSpec::GetPathAsConstString(), and lldb_private::FileSpec::SetDirectory().
|
staticprotected |
Definition at line 307 of file HostInfoBase.cpp.
|
staticprotected |
Definition at line 325 of file HostInfoBase.cpp.
References lldb_private::ArchSpec::Clear(), and lldb_private::ArchSpec::SetTriple().
Referenced by lldb_private::HostInfoLinux::ComputeHostArchitectureSupport().
|
static |
Definition at line 221 of file HostInfoBase.cpp.
References lldb_private::FileSpec::GetDirectory(), lldb_private::GetLog(), lldb_private::FileSpec::GetPath(), GetShlibDir(), lldb_private::Host, LLDB_LOG, and lldb_private::FileSpec::SetDirectory().
Referenced by lldb_private::HostInfoPosix::ComputeSupportExeDirectory().
|
staticprotected |
|
staticprotected |
Definition at line 248 of file HostInfoBase.cpp.
References ComputeSharedLibraryDirectory(), g_shlib_dir_helper, lldb_private::FileSpec::GetDirectory(), lldb_private::Host::GetModuleFileSpecForHostAddress(), and lldb_private::FileSpec::SetDirectory().
Referenced by ComputeSharedLibraryDirectory().
|
staticprotected |
Definition at line 265 of file HostInfoBase.cpp.
References GetShlibDir().
|
staticprotected |
Definition at line 313 of file HostInfoBase.cpp.
|
staticprotected |
Definition at line 284 of file HostInfoBase.cpp.
References lldb_private::FileSystem::Instance(), and lldb_private::FileSystem::Resolve().
Referenced by lldb_private::HostInfoAndroid::ComputeTempFileBaseDirectory().
|
staticprotected |
Definition at line 319 of file HostInfoBase.cpp.
|
inlinestatic |
Return the path to a specific tool in the specified Xcode SDK.
Definition at line 140 of file HostInfoBase.h.
|
static |
Definition at line 96 of file HostInfoBase.cpp.
References eArchKind32, eArchKind64, and g_fields.
|
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 199 of file HostInfoBase.cpp.
References lldb_private::ArchSpec::ContainsOnlyArch().
|
inlinestatic |
Returns the distribution id of the host.
This will be something like "ubuntu", "fedora", etc. on Linux.
Definition at line 158 of file HostInfoBase.h.
|
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 187 of file HostInfoBase.cpp.
References g_fields.
|
static |
Returns the directory containing the lldb headers.
Only the directory member of the FileSpec is filled in.
Definition at line 142 of file HostInfoBase.cpp.
References g_fields.
|
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 175 of file HostInfoBase.cpp.
References g_fields.
|
inlinestatic |
Return the directory containing something like a SDK (reused for Swift).
Definition at line 135 of file HostInfoBase.h.
|
inlinestatic |
Return information about module image_name
if it is loaded in the current process's address space.
Definition at line 148 of file HostInfoBase.h.
|
static |
Returns the directory containing the lldb shared library.
Only the directory member of the FileSpec is filled in.
Definition at line 122 of file HostInfoBase.cpp.
References g_fields.
Referenced by lldb_private::HostInfoMacOSX::ComputeHeaderDirectory(), ComputePathRelativeToLibrary(), ComputeSupportExeDirectory(), lldb_private::HostInfoMacOSX::ComputeSupportExeDirectory(), and lldb_private::HostInfoMacOSX::ComputeSystemPluginsDirectory().
|
static |
Returns the directory containing the support executables (debugserver, ...).
Only the directory member of the FileSpec is filled in.
Definition at line 132 of file HostInfoBase.cpp.
References g_fields.
|
static |
Returns the directory containing the system plugins.
Only the directory member of the FileSpec is filled in.
Definition at line 152 of file HostInfoBase.cpp.
References g_fields.
|
static |
Gets the host target triple.
Definition at line 89 of file HostInfoBase.cpp.
References g_fields.
|
static |
Returns the directory containing the user plugins.
Only the directory member of the FileSpec is filled in.
Definition at line 164 of file HostInfoBase.cpp.
References g_fields.
|
inlinestatic |
Definition at line 127 of file HostInfoBase.h.
|
inlinestatic |
Definition at line 128 of file HostInfoBase.h.
|
static |
Definition at line 76 of file HostInfoBase.cpp.
References g_fields, g_shlib_dir_helper, and lldb_private::LogChannelSystem::Initialize().
Referenced by lldb_private::HostInfoLinux::Initialize(), and lldb_private::HostInfoWindows::Initialize().
|
static |
Definition at line 114 of file HostInfoBase.cpp.
References eArchKind32, eArchKind64, eArchKindDefault, LLDB_ARCH_DEFAULT, LLDB_ARCH_DEFAULT_32BIT, and LLDB_ARCH_DEFAULT_64BIT.
|
static |
Definition at line 82 of file HostInfoBase.cpp.
References g_fields, g_shlib_dir_helper, and lldb_private::LogChannelSystem::Terminate().
Referenced by lldb_private::HostInfoLinux::Terminate(), and lldb_private::HostInfoWindows::Terminate().