LLVM 20.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::gsym::CUInfo Struct Reference

Public Member Functions

 CUInfo (DWARFContext &DICtx, DWARFCompileUnit *CU)
 
bool isHighestAddress (uint64_t Addr) const
 Return true if Addr is the highest address for a given compile unit.
 
std::optional< uint32_tDWARFToGSYMFileIndex (GsymCreator &Gsym, uint32_t DwarfFileIdx)
 Convert a DWARF compile unit file index into a GSYM global file index.
 

Public Attributes

const DWARFDebugLine::LineTableLineTable
 
const charCompDir
 
std::vector< uint32_tFileCache
 
uint64_t Language = 0
 
uint8_t AddrSize = 0
 

Detailed Description

Definition at line 28 of file DwarfTransformer.cpp.

Constructor & Destructor Documentation

◆ CUInfo()

llvm::gsym::CUInfo::CUInfo ( DWARFContext DICtx,
DWARFCompileUnit CU 
)
inline

Member Function Documentation

◆ DWARFToGSYMFileIndex()

std::optional< uint32_t > llvm::gsym::CUInfo::DWARFToGSYMFileIndex ( GsymCreator Gsym,
uint32_t  DwarfFileIdx 
)
inline

Convert a DWARF compile unit file index into a GSYM global file index.

Each compile unit in DWARF has its own file table in the line table prologue. GSYM has a single large file table that applies to all files from all of the info in a GSYM file. This function converts between the two and caches and DWARF CU file index that has already been converted so the first client that asks for a compile unit file index will end up doing the conversion, and subsequent clients will get the cached GSYM index.

Definition at line 67 of file DwarfTransformer.cpp.

References CompDir, and llvm::gsym::GsymCreator::insertFile().

Referenced by convertFunctionLineTable(), and parseInlineInfo().

◆ isHighestAddress()

bool llvm::gsym::CUInfo::isHighestAddress ( uint64_t  Addr) const
inline

Return true if Addr is the highest address for a given compile unit.

The highest address is encoded as -1, of all ones in the address. These high addresses are used by some linkers to indicate that a function has been dead stripped or didn't end up in the linked executable.

Definition at line 50 of file DwarfTransformer.cpp.

References Addr, AddrSize, and UINT64_MAX.

Member Data Documentation

◆ AddrSize

uint8_t llvm::gsym::CUInfo::AddrSize = 0

Definition at line 33 of file DwarfTransformer.cpp.

Referenced by CUInfo(), and isHighestAddress().

◆ CompDir

const char* llvm::gsym::CUInfo::CompDir

Definition at line 30 of file DwarfTransformer.cpp.

Referenced by CUInfo(), and DWARFToGSYMFileIndex().

◆ FileCache

std::vector<uint32_t> llvm::gsym::CUInfo::FileCache

Definition at line 31 of file DwarfTransformer.cpp.

◆ Language

uint64_t llvm::gsym::CUInfo::Language = 0

Definition at line 32 of file DwarfTransformer.cpp.

Referenced by CUInfo(), and parseInlineInfo().

◆ LineTable

const DWARFDebugLine::LineTable* llvm::gsym::CUInfo::LineTable

Definition at line 29 of file DwarfTransformer.cpp.

Referenced by convertFunctionLineTable().


The documentation for this struct was generated from the following file: