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 | 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 | 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) |
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 |
Definition at line 316 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().
Definition at line 331 of file HostInfoBase.cpp.
|
staticprotected |
Definition at line 363 of file HostInfoBase.cpp.
References lldb_private::ArchSpec::Clear(), and lldb_private::ArchSpec::SetTriple().
Referenced by lldb_private::HostInfoLinux::ComputeHostArchitectureSupport().
|
static |
Definition at line 245 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().
Definition at line 272 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().
Definition at line 289 of file HostInfoBase.cpp.
References GetShlibDir().
Definition at line 337 of file HostInfoBase.cpp.
Definition at line 308 of file HostInfoBase.cpp.
References lldb_private::FileSystem::Instance(), and lldb_private::FileSystem::Resolve().
Referenced by lldb_private::HostInfoAndroid::ComputeTempFileBaseDirectory().
Definition at line 343 of file HostInfoBase.cpp.
References lldb_private::FileSpec::GetPathAsConstString(), lldb_private::FileSystem::Instance(), lldb_private::FileSystem::Resolve(), and lldb_private::FileSpec::SetDirectory().
Definition at line 350 of file HostInfoBase.cpp.
References lldb_private::FileSpec::AppendPathComponent(), lldb_private::FileSpec::GetPathAsConstString(), GetUserHomeDir(), and lldb_private::FileSpec::SetDirectory().
Definition at line 357 of file HostInfoBase.cpp.
|
inlinestatic |
Return the path to a specific tool in the specified Xcode SDK.
Definition at line 150 of file HostInfoBase.h.
|
static |
Definition at line 100 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 223 of file HostInfoBase.cpp.
References lldb_private::ArchSpec::ContainsOnlyArch().
|
inlinestatic |
Definition at line 138 of file HostInfoBase.h.
|
inlinestatic |
Definition at line 137 of file HostInfoBase.h.
|
inlinestatic |
Returns the distribution id of the host.
This will be something like "ubuntu", "fedora", etc. on Linux.
Definition at line 168 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 211 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 146 of file HostInfoBase.cpp.
References g_fields.
|
static |
Returns the process 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 199 of file HostInfoBase.cpp.
References g_fields.
|
inlinestatic |
Return the directory containing something like a SDK (reused for Swift).
Definition at line 145 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 158 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 126 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 136 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 156 of file HostInfoBase.cpp.
References g_fields.
|
static |
Gets the host target triple.
Definition at line 93 of file HostInfoBase.cpp.
References g_fields.
|
static |
Returns the directory containing the users home (e.g.
~/). Only the directory member of the FileSpec is filled in.
Definition at line 168 of file HostInfoBase.cpp.
References g_fields.
Referenced by ComputeUserLLDBHomeDirectory(), and lldb_private::HostInfoMacOSX::ComputeUserPluginsDirectory().
|
static |
Returns the directory containing the users lldb home (e.g.
~/.lldb/). Only the directory member of the FileSpec is filled in.
Definition at line 178 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 188 of file HostInfoBase.cpp.
References g_fields.
|
inlinestatic |
Definition at line 135 of file HostInfoBase.h.
|
inlinestatic |
Definition at line 136 of file HostInfoBase.h.
|
static |
Definition at line 80 of file HostInfoBase.cpp.
References g_fields, g_shlib_dir_helper, and lldb_private::LogChannelSystem::Initialize().
Referenced by lldb_private::HostInfoAIX::Initialize(), lldb_private::HostInfoLinux::Initialize(), and lldb_private::HostInfoWindows::Initialize().
|
static |
Definition at line 118 of file HostInfoBase.cpp.
References eArchKind32, eArchKind64, eArchKindDefault, LLDB_ARCH_DEFAULT, LLDB_ARCH_DEFAULT_32BIT, and LLDB_ARCH_DEFAULT_64BIT.
|
static |
Definition at line 86 of file HostInfoBase.cpp.
References g_fields, g_shlib_dir_helper, and lldb_private::LogChannelSystem::Terminate().
Referenced by lldb_private::HostInfoAIX::Terminate(), lldb_private::HostInfoLinux::Terminate(), and lldb_private::HostInfoWindows::Terminate().