LLVM  16.0.0git
Namespaces | Functions
Debuginfod.cpp File Reference
#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 <thread>
Include dependency graph for Debuginfod.cpp:

Go to the source code of this file.


 This is an optimization pass for GlobalISel generic memory operations.


static std::string llvm::uniqueKey (llvm::StringRef S)
static std::string llvm::buildIDToString (BuildIDRef ID)
Expected< SmallVector< StringRef > > llvm::getDefaultDebuginfodUrls ()
 Finds default array of Debuginfod server URLs by checking DEBUGINFOD_URLS environment variable. More...
Expected< std::string > llvm::getDefaultDebuginfodCacheDirectory ()
 Finds a default local file caching directory for the debuginfod client, first checking DEBUGINFOD_CACHE_PATH. More...
std::chrono::milliseconds llvm::getDefaultDebuginfodTimeout ()
 Finds a default timeout for debuginfod HTTP requests. More...
Expected< std::string > llvm::getCachedOrDownloadSource (BuildIDRef ID, StringRef SourceFilePath)
 The following functions fetch a debuginfod artifact to a file in a local cache and return the cached file path. More...
Expected< std::string > llvm::getCachedOrDownloadExecutable (BuildIDRef ID)
Expected< std::string > llvm::getCachedOrDownloadDebuginfo (BuildIDRef ID)
Expected< std::string > llvm::getCachedOrDownloadArtifact (StringRef UniqueKey, StringRef UrlPath)
 Fetches any debuginfod artifact using the default local cache directory and server URLs. More...
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). More...
static bool llvm::hasELFMagic (StringRef FilePath)

Detailed Description

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.