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 (const std::string &ModuleName, object::SectionedAddress ModuleOffset)
 
Expected< DILineInfosymbolizeCode (ArrayRef< uint8_t > BuildID, object::SectionedAddress ModuleOffset)
 
Expected< DIInliningInfosymbolizeInlinedCode (const ObjectFile &Obj, object::SectionedAddress ModuleOffset)
 
Expected< DIInliningInfosymbolizeInlinedCode (const std::string &ModuleName, object::SectionedAddress ModuleOffset)
 
Expected< DIInliningInfosymbolizeInlinedCode (ArrayRef< uint8_t > BuildID, object::SectionedAddress ModuleOffset)
 
Expected< DIGlobalsymbolizeData (const ObjectFile &Obj, object::SectionedAddress ModuleOffset)
 
Expected< DIGlobalsymbolizeData (const std::string &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 (const std::string &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 (const std::string &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 (const std::string &ModuleName)
 Returns a SymbolizableModule or an error if loading debug info failed.
 

Static Public Member Functions

static std::string DemangleName (const std::string &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 46 of file Symbolize.cpp.

◆ ~LLVMSymbolizer()

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

Member Function Documentation

◆ DemangleName()

std::string llvm::symbolize::LLVMSymbolizer::DemangleName ( const std::string &  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 281 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 269 of file Symbolize.cpp.

References llvm::Offset.

◆ findSymbol() [3/3]

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

Definition at line 275 of file Symbolize.cpp.

References llvm::Offset.

◆ flush()

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

Definition at line 286 of file Symbolize.cpp.

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

◆ getOrCreateModuleInfo()

Expected< SymbolizableModule * > llvm::symbolize::LLVMSymbolizer::getOrCreateModuleInfo ( const std::string &  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 607 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 127 of file Symbolize.h.

◆ symbolizeCode() [1/3]

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

Definition at line 96 of file Symbolize.cpp.

◆ symbolizeCode() [2/3]

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

Definition at line 84 of file Symbolize.cpp.

◆ symbolizeCode() [3/3]

Expected< DILineInfo > llvm::symbolize::LLVMSymbolizer::symbolizeCode ( const std::string &  ModuleName,
object::SectionedAddress  ModuleOffset 
)

Definition at line 90 of file Symbolize.cpp.

◆ symbolizeData() [1/3]

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

Definition at line 192 of file Symbolize.cpp.

◆ symbolizeData() [2/3]

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

Definition at line 180 of file Symbolize.cpp.

◆ symbolizeData() [3/3]

Expected< DIGlobal > llvm::symbolize::LLVMSymbolizer::symbolizeData ( const std::string &  ModuleName,
object::SectionedAddress  ModuleOffset 
)

Definition at line 186 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 233 of file Symbolize.cpp.

◆ symbolizeFrame() [2/3]

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

Definition at line 221 of file Symbolize.cpp.

◆ symbolizeFrame() [3/3]

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

Definition at line 227 of file Symbolize.cpp.

◆ symbolizeInlinedCode() [1/3]

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

Definition at line 147 of file Symbolize.cpp.

◆ symbolizeInlinedCode() [2/3]

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

Definition at line 135 of file Symbolize.cpp.

◆ symbolizeInlinedCode() [3/3]

Expected< DIInliningInfo > llvm::symbolize::LLVMSymbolizer::symbolizeInlinedCode ( const std::string &  ModuleName,
object::SectionedAddress  ModuleOffset 
)

Definition at line 141 of file Symbolize.cpp.


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