LLDB mainline
lldb_private::SymbolLocator Class Reference

#include <SymbolLocator.h>

Inheritance diagram for lldb_private::SymbolLocator:
[legend]

Classes

class  NotFound
 A binary was not found and nothing could say why. More...
struct  Request
 One binary to search for. More...
struct  Result
 What a search found. More...

Public Member Functions

 SymbolLocator ()=default
Public Member Functions inherited from lldb_private::PluginInterface
 PluginInterface ()=default
virtual ~PluginInterface ()=default
virtual llvm::StringRef GetPluginName ()=0
 PluginInterface (const PluginInterface &)=delete
PluginInterfaceoperator= (const PluginInterface &)=delete

Static Public Member Functions

static llvm::Expected< ResultLocate (const Request &request, const FileSpecList &search_paths)
 Find a binary and, if possible, its symbols.
static std::vector< llvm::Expected< Result > > Locate (llvm::ArrayRef< Request > requests, const FileSpecList &search_paths, bool parallel)
 The platform hooks run on the calling thread, in order.
static void DownloadSymbolFileAsync (const UUID &uuid)
 Locate the symbol file for the given UUID on a background thread.

Static Private Member Functions

static llvm::Expected< ResultLocateWithPlugins (const Request &request, const FileSpecList &search_paths)
 Must stay callable concurrently.

Detailed Description

Definition at line 28 of file SymbolLocator.h.

Constructor & Destructor Documentation

◆ SymbolLocator()

Member Function Documentation

◆ DownloadSymbolFileAsync()

void SymbolLocator::DownloadSymbolFileAsync ( const UUID & uuid)
static

Locate the symbol file for the given UUID on a background thread.

This function returns immediately. Under the hood it uses the debugger's thread pool to call DownloadObjectAndSymbolFile. If a symbol file is found, this will notify all target which contain the module with the given UUID.

Definition at line 147 of file SymbolLocator.cpp.

References lldb_private::PluginManager::DownloadObjectAndSymbolFile(), error(), lldb::eSymbolDownloadBackground, lldb::eSymbolDownloadForeground, lldb::eSymbolDownloadOff, lldb_private::ModuleList::GetGlobalModuleListProperties(), lldb_private::Debugger::GetThreadPool(), lldb_private::ModuleSpec::GetUUID(), and lldb_private::Debugger::ReportSymbolChange().

Referenced by lldb_private::Module::GetUnwindTable().

◆ Locate() [1/2]

llvm::Expected< SymbolLocator::Result > SymbolLocator::Locate ( const Request & request,
const FileSpecList & search_paths )
static

Find a binary and, if possible, its symbols.

Mutates no Target and no Process, which is what lets a caller holding several binaries search for all of them before installing any.

Returns
Where the binary is, or an error if it could not be found at all. Finding the binary but not its symbols is a success, with Result::symbol_error carrying whatever a symbol server had to say about them.

A miss carries an external symbol server's explanation if it gave one, and is a NotFound when nothing could say why.

Definition at line 92 of file SymbolLocator.cpp.

References AskPlatform(), and LocateWithPlugins().

Referenced by lldb_private::DynamicLoader::LocateBinaries().

◆ Locate() [2/2]

std::vector< llvm::Expected< SymbolLocator::Result > > SymbolLocator::Locate ( llvm::ArrayRef< Request > requests,
const FileSpecList & search_paths,
bool parallel )
static

The platform hooks run on the calling thread, in order.

Only the plugin searches may run concurrently.

Returns
One result per request, in the order the requests were given.

Definition at line 100 of file SymbolLocator.cpp.

References AskPlatform(), lldb_private::Debugger::GetThreadPool(), lldb_private::Progress::Increment(), lldb_private::Progress::kDefaultHighFrequencyReportTime, and LocateWithPlugins().

◆ LocateWithPlugins()


The documentation for this class was generated from the following files: