LLVM 20.0.0git
Classes | Namespaces | Functions
Debuginfod.h File Reference

This file contains several declarations for the debuginfod client and server. More...

#include "HTTPServer.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Object/BuildID.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Mutex.h"
#include "llvm/Support/RWMutex.h"
#include "llvm/Support/Timer.h"
#include <chrono>
#include <condition_variable>
#include <optional>
#include <queue>

Go to the source code of this file.

Classes

struct  llvm::DebuginfodLogEntry
 
class  llvm::DebuginfodLog
 
class  llvm::DebuginfodCollection
 Tracks a collection of debuginfod artifacts on the local filesystem. More...
 
struct  llvm::DebuginfodServer
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Functions

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.
 
std::string llvm::getDebuginfodCacheKey (StringRef UrlPath)
 Returns the cache key for a given debuginfod URL path.
 
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.
 
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).
 

Detailed Description

This file contains several declarations for the debuginfod client and server.

The client functions are getDefaultDebuginfodUrls, getCachedOrDownloadArtifact, and several convenience functions for specific artifact types: getCachedOrDownloadSource, getCachedOrDownloadExecutable, and getCachedOrDownloadDebuginfo. For the server, this file declares the DebuginfodLogEntry and DebuginfodServer structs, as well as the DebuginfodLog, DebuginfodCollection classes.

Definition in file Debuginfod.h.