LLVM 22.0.0git
|
This file contains several definitions for the debuginfod client and server. More...
#include "llvm/Debuginfod/Debuginfod.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/Magic.h"
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
#include "llvm/DebugInfo/Symbolize/Symbolize.h"
#include "llvm/Debuginfod/HTTPClient.h"
#include "llvm/Object/BuildID.h"
#include "llvm/Object/ELFObjectFile.h"
#include "llvm/Support/CachePruning.h"
#include "llvm/Support/Caching.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileUtilities.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/ThreadPool.h"
#include "llvm/Support/xxhash.h"
#include <atomic>
#include <optional>
#include <thread>
Go to the source code of this file.
Namespaces | |
namespace | llvm |
This is an optimization pass for GlobalISel generic memory operations. |
Typedefs | |
typedef ArrayRef< uint8_t > | llvm::BuildIDRef |
A reference to a BuildID in binary form. |
Functions | |
std::string | llvm::getDebuginfodCacheKey (StringRef UrlPath) |
Returns the cache key for a given debuginfod URL path. | |
static std::string | llvm::buildIDToString (BuildIDRef ID) |
bool | llvm::canUseDebuginfod () |
Returns false if a debuginfod lookup can be determined to have no chance of succeeding. | |
SmallVector< StringRef > | llvm::getDefaultDebuginfodUrls () |
Finds default array of Debuginfod server URLs by checking DEBUGINFOD_URLS environment variable. | |
void | llvm::setDefaultDebuginfodUrls (const SmallVector< StringRef > &URLs) |
Sets the list of debuginfod server URLs to query. | |
Expected< std::string > | llvm::getDefaultDebuginfodCacheDirectory () |
Finds a default local file caching directory for the debuginfod client, first checking DEBUGINFOD_CACHE_PATH. | |
std::chrono::milliseconds | llvm::getDefaultDebuginfodTimeout () |
Finds a default timeout for debuginfod HTTP requests. | |
std::string | llvm::getDebuginfodSourceUrlPath (object::BuildIDRef ID, StringRef SourceFilePath) |
Get the full URL path for a source request of a given BuildID and file path. | |
Expected< std::string > | llvm::getCachedOrDownloadSource (object::BuildIDRef ID, StringRef SourceFilePath) |
Fetches a specified source file by searching the default local cache directory and server URLs. | |
std::string | llvm::getDebuginfodExecutableUrlPath (object::BuildIDRef ID) |
Get the full URL path for an executable request of a given BuildID. | |
Expected< std::string > | llvm::getCachedOrDownloadExecutable (object::BuildIDRef ID) |
Fetches an executable by searching the default local cache directory and server URLs. | |
std::string | llvm::getDebuginfodDebuginfoUrlPath (object::BuildIDRef ID) |
Get the full URL path for a debug binary request of a given BuildID. | |
Expected< std::string > | llvm::getCachedOrDownloadDebuginfo (object::BuildIDRef ID) |
Fetches a debug binary by searching the default local cache directory and server URLs. | |
Expected< std::string > | llvm::getCachedOrDownloadArtifact (StringRef UniqueKey, StringRef UrlPath) |
Fetches any debuginfod artifact using the default local cache directory and server URLs. | |
static bool | llvm::isHeader (StringRef S) |
static SmallVector< std::string, 0 > | llvm::getHeaders () |
Expected< std::string > | llvm::getCachedOrDownloadArtifact (StringRef UniqueKey, StringRef UrlPath, StringRef CacheDirectoryPath, ArrayRef< StringRef > DebuginfodUrls, std::chrono::milliseconds Timeout) |
Fetches any debuginfod artifact using the specified local cache directory, server URLs, and request timeout (in milliseconds). | |
static bool | llvm::hasELFMagic (StringRef FilePath) |
This file contains several definitions for the debuginfod client and server.
For the client, this file defines the fetchInfo function. For the server, this file defines the DebuginfodLogEntry and DebuginfodServer structs, as well as the DebuginfodLog, DebuginfodCollection classes. The fetchInfo function retrieves any of the three supported artifact types: (executable, debuginfo, source file) associated with a build-id from debuginfod servers. If a source file is to be fetched, its absolute path must be specified in the Description argument to fetchInfo. The DebuginfodLogEntry, DebuginfodLog, and DebuginfodCollection are used by the DebuginfodServer to scan the local filesystem for binaries and serve the debuginfod protocol.
Definition in file Debuginfod.cpp.