|
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 | SetSharedLibraryDirectoryHelper (SharedLibraryDirectoryHelper *helper) |
| static void | Initialize () |
| 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 (ConstString filepath, lldb::SymbolSharedCacheUse sc_mode) |
Return information about module filepath if it is loaded in the current process's address space. | |
| static SharedCacheImageInfo | GetSharedCacheImageInfo (const UUID &uuid, lldb::SymbolSharedCacheUse sc_mode) |
Return information about module uuid if it is loaded in the current process's address space. | |
| static SharedCacheImageInfo | GetSharedCacheImageInfo (ConstString filepath, const UUID &sc_uuid, lldb::SymbolSharedCacheUse sc_mode) |
Return information about module filepath, if it is loaded in the current process's address space using shared cache sc_uuid. | |
| static SharedCacheImageInfo | GetSharedCacheImageInfo (const UUID &uuid, const UUID &sc_uuid, lldb::SymbolSharedCacheUse sc_mode) |
Return information about module uuid, if it is loaded in the current process's address space using shared cache sc_uuid. | |
| static SharedCacheImageInfo | GetSharedCacheImageInfo (llvm::StringRef image_name, const UUID &uuid, lldb::SymbolSharedCacheUse sc_mode) |
Return information about module image_name if it is loaded in the current process's address space using shared cache uuid. | |
| static bool | SharedCacheIndexFiles (FileSpec &filepath, UUID &uuid, lldb::SymbolSharedCacheUse sc_mode) |
| Scan the files in a shared cache, if the filepath and uuid match on the debug host. | |
| static llvm::StringRef | GetDistributionId () |
| Returns the distribution id of the host. | |
Static Protected Member Functions | |
| static bool | ComputeSharedLibraryDirectory (FileSpec &file_spec, SharedLibraryDirectoryHelper *helper) |
| 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 87 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 98 of file HostInfoBase.h.
| Enumerator | |
|---|---|
| eArchKindDefault | |
| eArchKind32 | |
| eArchKind64 | |
Definition at line 111 of file HostInfoBase.h.
|
privatedefault |
|
privatedefault |
Definition at line 335 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 350 of file HostInfoBase.cpp.
|
staticprotected |
Definition at line 382 of file HostInfoBase.cpp.
References lldb_private::ArchSpec::Clear(), and lldb_private::ArchSpec::SetTriple().
Referenced by lldb_private::HostInfoLinux::ComputeHostArchitectureSupport().
|
static |
Definition at line 253 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 |
Definition at line 290 of file HostInfoBase.cpp.
References ComputeSharedLibraryDirectory(), lldb_private::FileSpec::GetDirectory(), lldb_private::Host::GetModuleFileSpecForHostAddress(), and lldb_private::FileSpec::SetDirectory().
Referenced by ComputeSharedLibraryDirectory().
Definition at line 308 of file HostInfoBase.cpp.
References GetShlibDir().
Definition at line 356 of file HostInfoBase.cpp.
Definition at line 327 of file HostInfoBase.cpp.
References lldb_private::FileSystem::Instance(), and lldb_private::FileSystem::Resolve().
Referenced by lldb_private::HostInfoAndroid::ComputeTempFileBaseDirectory().
Definition at line 362 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 369 of file HostInfoBase.cpp.
References lldb_private::FileSpec::AppendPathComponent(), lldb_private::FileSpec::GetPathAsConstString(), GetUserHomeDir(), and lldb_private::FileSpec::SetDirectory().
Definition at line 376 of file HostInfoBase.cpp.
|
inlinestatic |
Return the path to a specific tool in the specified Xcode SDK.
Definition at line 187 of file HostInfoBase.h.
|
static |
Definition at line 104 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 231 of file HostInfoBase.cpp.
References lldb_private::ArchSpec::ContainsOnlyArch().
|
inlinestatic |
Definition at line 175 of file HostInfoBase.h.
|
inlinestatic |
Definition at line 174 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 275 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 219 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 154 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 207 of file HostInfoBase.cpp.
References g_fields.
|
inlinestatic |
Return the directory containing something like a SDK (reused for Swift).
Definition at line 182 of file HostInfoBase.h.
|
inlinestatic |
Return information about module uuid, if it is loaded in the current process's address space using shared cache sc_uuid.
The shared cache must have been previously indexed.
| [in] | sc_mode | Flag to control if this method can try to read a shared cache binary blob directly, needed to keep user settings out of Host. |
Definition at line 241 of file HostInfoBase.h.
|
inlinestatic |
Return information about module uuid if it is loaded in the current process's address space.
| [in] | sc_mode | Flag to control if this method can try to read a shared cache binary blob directly, needed to keep user settings out of Host. |
Definition at line 213 of file HostInfoBase.h.
|
inlinestatic |
Return information about module filepath, if it is loaded in the current process's address space using shared cache sc_uuid.
The shared cache must have been previously indexed.
| [in] | sc_mode | Flag to control if this method can try to read a shared cache binary blob directly, needed to keep user settings out of Host. |
Definition at line 227 of file HostInfoBase.h.
|
inlinestatic |
Return information about module filepath if it is loaded in the current process's address space.
| [in] | sc_mode | Flag to control if this method can try to read a shared cache binary blob directly, needed to keep user settings out of Host. |
Definition at line 200 of file HostInfoBase.h.
|
inlinestatic |
Return information about module image_name if it is loaded in the current process's address space using shared cache uuid.
The shared cache UUID must have been previously indexed.
| [in] | use_sc_binary_directly | Flag to control if this method can try to read a shared cache binary blob directly, needed to keep user settings out of Host. |
Definition at line 255 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 130 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 144 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 164 of file HostInfoBase.cpp.
References g_fields.
|
static |
Gets the host target triple.
Definition at line 97 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 176 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 186 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 196 of file HostInfoBase.cpp.
References g_fields.
|
inlinestatic |
Definition at line 172 of file HostInfoBase.h.
|
inlinestatic |
Definition at line 173 of file HostInfoBase.h.
|
static |
Definition at line 86 of file HostInfoBase.cpp.
References g_fields, and lldb_private::LogChannelSystem::Initialize().
Referenced by lldb_private::HostInfoAIX::Initialize(), lldb_private::HostInfoLinux::Initialize(), and lldb_private::HostInfoWindows::Initialize().
|
static |
Definition at line 122 of file HostInfoBase.cpp.
References eArchKind32, eArchKind64, eArchKindDefault, LLDB_ARCH_DEFAULT, LLDB_ARCH_DEFAULT_32BIT, and LLDB_ARCH_DEFAULT_64BIT.
|
static |
Definition at line 280 of file HostInfoBase.cpp.
References g_fields.
|
inlinestatic |
Scan the files in a shared cache, if the filepath and uuid match on the debug host.
Returns false if the shared cache filepath did not exist, or uuid did not match.
Definition at line 264 of file HostInfoBase.h.
|
static |
Definition at line 91 of file HostInfoBase.cpp.
References g_fields, and lldb_private::LogChannelSystem::Terminate().
Referenced by lldb_private::HostInfoAIX::Terminate(), lldb_private::HostInfoLinux::Terminate(), and lldb_private::HostInfoWindows::Terminate().