LLVM 20.0.0git
Classes | Public Member Functions | Static Public Member Functions | List of all members
llvm::symbolize::LLVMSymbolizer Class Reference

#include "llvm/DebugInfo/Symbolize/Symbolize.h"

Classes

struct  Options
 

Public Member Functions

 LLVMSymbolizer ()
 
 LLVMSymbolizer (const Options &Opts)
 
 ~LLVMSymbolizer ()
 
Expected< DILineInfosymbolizeCode (const ObjectFile &Obj, object::SectionedAddress ModuleOffset)
 
Expected< DILineInfosymbolizeCode (StringRef ModuleName, object::SectionedAddress ModuleOffset)
 
Expected< DILineInfosymbolizeCode (ArrayRef< uint8_t > BuildID, object::SectionedAddress ModuleOffset)
 
Expected< DIInliningInfosymbolizeInlinedCode (const ObjectFile &Obj, object::SectionedAddress ModuleOffset)
 
Expected< DIInliningInfosymbolizeInlinedCode (StringRef ModuleName, object::SectionedAddress ModuleOffset)
 
Expected< DIInliningInfosymbolizeInlinedCode (ArrayRef< uint8_t > BuildID, object::SectionedAddress ModuleOffset)
 
Expected< DIGlobalsymbolizeData (const ObjectFile &Obj, object::SectionedAddress ModuleOffset)
 
Expected< DIGlobalsymbolizeData (StringRef ModuleName, object::SectionedAddress ModuleOffset)
 
Expected< DIGlobalsymbolizeData (ArrayRef< uint8_t > BuildID, object::SectionedAddress ModuleOffset)
 
Expected< std::vector< DILocal > > symbolizeFrame (const ObjectFile &Obj, object::SectionedAddress ModuleOffset)
 
Expected< std::vector< DILocal > > symbolizeFrame (StringRef ModuleName, object::SectionedAddress ModuleOffset)
 
Expected< std::vector< DILocal > > symbolizeFrame (ArrayRef< uint8_t > BuildID, object::SectionedAddress ModuleOffset)
 
Expected< std::vector< DILineInfo > > findSymbol (const ObjectFile &Obj, StringRef Symbol, uint64_t Offset)
 
Expected< std::vector< DILineInfo > > findSymbol (StringRef ModuleName, StringRef Symbol, uint64_t Offset)
 
Expected< std::vector< DILineInfo > > findSymbol (ArrayRef< uint8_t > BuildID, StringRef Symbol, uint64_t Offset)
 
void flush ()
 
void pruneCache ()
 
void setBuildIDFetcher (std::unique_ptr< BuildIDFetcher > Fetcher)
 
Expected< SymbolizableModule * > getOrCreateModuleInfo (StringRef ModuleName)
 Returns a SymbolizableModule or an error if loading debug info failed.
 

Static Public Member Functions

static std::string DemangleName (StringRef Name, const SymbolizableModule *DbiModuleDescriptor)
 

Detailed Description

Definition at line 50 of file Symbolize.h.

Constructor & Destructor Documentation

◆ LLVMSymbolizer() [1/2]

llvm::symbolize::LLVMSymbolizer::LLVMSymbolizer ( )
default

◆ LLVMSymbolizer() [2/2]

llvm::symbolize::LLVMSymbolizer::LLVMSymbolizer ( const Options Opts)

Definition at line 45 of file Symbolize.cpp.

◆ ~LLVMSymbolizer()

llvm::symbolize::LLVMSymbolizer::~LLVMSymbolizer ( )
default

Member Function Documentation

◆ DemangleName()

std::string llvm::symbolize::LLVMSymbolizer::DemangleName ( StringRef  Name,
const SymbolizableModule DbiModuleDescriptor 
)
static

◆ findSymbol() [1/3]

Expected< std::vector< DILineInfo > > llvm::symbolize::LLVMSymbolizer::findSymbol ( ArrayRef< uint8_t BuildID,
StringRef  Symbol,
uint64_t  Offset 
)

Definition at line 280 of file Symbolize.cpp.

References llvm::Offset.

◆ findSymbol() [2/3]

Expected< std::vector< DILineInfo > > llvm::symbolize::LLVMSymbolizer::findSymbol ( const ObjectFile Obj,
StringRef  Symbol,
uint64_t  Offset 
)

Definition at line 268 of file Symbolize.cpp.

References llvm::Offset.

◆ findSymbol() [3/3]

Expected< std::vector< DILineInfo > > llvm::symbolize::LLVMSymbolizer::findSymbol ( StringRef  ModuleName,
StringRef  Symbol,
uint64_t  Offset 
)

Definition at line 274 of file Symbolize.cpp.

References llvm::Offset.

◆ flush()

void llvm::symbolize::LLVMSymbolizer::flush ( )

Definition at line 285 of file Symbolize.cpp.

References llvm::StringMap< ValueTy, AllocatorTy >::clear().

◆ getOrCreateModuleInfo()

Expected< SymbolizableModule * > llvm::symbolize::LLVMSymbolizer::getOrCreateModuleInfo ( StringRef  ModuleName)

Returns a SymbolizableModule or an error if loading debug info failed.

Only one attempt is made to load a module, and errors during loading are only reported once. Subsequent calls to get module info for a module that failed to load will return nullptr.

Definition at line 606 of file Symbolize.cpp.

References llvm::any_of(), llvm::DWARFContext::create(), llvm::createFileError(), llvm::dwarf_linker::DebugInfo, llvm::symbolize::LLVMSymbolizer::Options::DefaultArch, llvm::symbolize::LLVMSymbolizer::Options::DWPName, llvm::StringRef::empty(), I, llvm::DWARFContext::Process, llvm::Triple::UnknownArch, and llvm::symbolize::LLVMSymbolizer::Options::UseDIA.

◆ pruneCache()

void llvm::symbolize::LLVMSymbolizer::pruneCache ( )

◆ setBuildIDFetcher()

void llvm::symbolize::LLVMSymbolizer::setBuildIDFetcher ( std::unique_ptr< BuildIDFetcher Fetcher)
inline

Definition at line 125 of file Symbolize.h.

◆ symbolizeCode() [1/3]

Expected< DILineInfo > llvm::symbolize::LLVMSymbolizer::symbolizeCode ( ArrayRef< uint8_t BuildID,
object::SectionedAddress  ModuleOffset 
)

Definition at line 95 of file Symbolize.cpp.

◆ symbolizeCode() [2/3]

Expected< DILineInfo > llvm::symbolize::LLVMSymbolizer::symbolizeCode ( const ObjectFile Obj,
object::SectionedAddress  ModuleOffset 
)

Definition at line 83 of file Symbolize.cpp.

◆ symbolizeCode() [3/3]

Expected< DILineInfo > llvm::symbolize::LLVMSymbolizer::symbolizeCode ( StringRef  ModuleName,
object::SectionedAddress  ModuleOffset 
)

Definition at line 89 of file Symbolize.cpp.

◆ symbolizeData() [1/3]

Expected< DIGlobal > llvm::symbolize::LLVMSymbolizer::symbolizeData ( ArrayRef< uint8_t BuildID,
object::SectionedAddress  ModuleOffset 
)

Definition at line 191 of file Symbolize.cpp.

◆ symbolizeData() [2/3]

Expected< DIGlobal > llvm::symbolize::LLVMSymbolizer::symbolizeData ( const ObjectFile Obj,
object::SectionedAddress  ModuleOffset 
)

Definition at line 179 of file Symbolize.cpp.

◆ symbolizeData() [3/3]

Expected< DIGlobal > llvm::symbolize::LLVMSymbolizer::symbolizeData ( StringRef  ModuleName,
object::SectionedAddress  ModuleOffset 
)

Definition at line 185 of file Symbolize.cpp.

◆ symbolizeFrame() [1/3]

Expected< std::vector< DILocal > > llvm::symbolize::LLVMSymbolizer::symbolizeFrame ( ArrayRef< uint8_t BuildID,
object::SectionedAddress  ModuleOffset 
)

Definition at line 232 of file Symbolize.cpp.

◆ symbolizeFrame() [2/3]

Expected< std::vector< DILocal > > llvm::symbolize::LLVMSymbolizer::symbolizeFrame ( const ObjectFile Obj,
object::SectionedAddress  ModuleOffset 
)

Definition at line 220 of file Symbolize.cpp.

◆ symbolizeFrame() [3/3]

Expected< std::vector< DILocal > > llvm::symbolize::LLVMSymbolizer::symbolizeFrame ( StringRef  ModuleName,
object::SectionedAddress  ModuleOffset 
)

Definition at line 226 of file Symbolize.cpp.

◆ symbolizeInlinedCode() [1/3]

Expected< DIInliningInfo > llvm::symbolize::LLVMSymbolizer::symbolizeInlinedCode ( ArrayRef< uint8_t BuildID,
object::SectionedAddress  ModuleOffset 
)

Definition at line 146 of file Symbolize.cpp.

◆ symbolizeInlinedCode() [2/3]

Expected< DIInliningInfo > llvm::symbolize::LLVMSymbolizer::symbolizeInlinedCode ( const ObjectFile Obj,
object::SectionedAddress  ModuleOffset 
)

Definition at line 134 of file Symbolize.cpp.

◆ symbolizeInlinedCode() [3/3]

Expected< DIInliningInfo > llvm::symbolize::LLVMSymbolizer::symbolizeInlinedCode ( StringRef  ModuleName,
object::SectionedAddress  ModuleOffset 
)

Definition at line 140 of file Symbolize.cpp.


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