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

A class representing the header of a list table such as the range list table in the .debug_rnglists section. More...

#include "llvm/DebugInfo/DWARF/DWARFListTable.h"

Public Member Functions

 DWARFListTableHeader (StringRef SectionName, StringRef ListTypeString)
 
void clear ()
 
uint64_t getHeaderOffset () const
 
uint8_t getAddrSize () const
 
uint64_t getLength () const
 
uint16_t getVersion () const
 
uint32_t getOffsetEntryCount () const
 
StringRef getSectionName () const
 
StringRef getListTypeString () const
 
dwarf::DwarfFormat getFormat () const
 
void dump (DataExtractor Data, raw_ostream &OS, DIDumpOptions DumpOpts={}) const
 
std::optional< uint64_tgetOffsetEntry (DataExtractor Data, uint32_t Index) const
 
Error extract (DWARFDataExtractor Data, uint64_t *OffsetPtr)
 Extract the table header and the array of offsets.
 
uint64_t length () const
 Returns the length of the table, including the length field, or 0 if the length has not been determined (e.g.
 

Static Public Member Functions

static uint8_t getHeaderSize (dwarf::DwarfFormat Format)
 Return the size of the table header including the length but not including the offsets.
 
static std::optional< uint64_tgetOffsetEntry (DataExtractor Data, uint64_t OffsetTableOffset, dwarf::DwarfFormat Format, uint32_t Index)
 

Detailed Description

A class representing the header of a list table such as the range list table in the .debug_rnglists section.

Definition at line 55 of file DWARFListTable.h.

Constructor & Destructor Documentation

◆ DWARFListTableHeader()

llvm::DWARFListTableHeader::DWARFListTableHeader ( StringRef  SectionName,
StringRef  ListTypeString 
)
inline

Definition at line 86 of file DWARFListTable.h.

Member Function Documentation

◆ clear()

void llvm::DWARFListTableHeader::clear ( )
inline

Definition at line 89 of file DWARFListTable.h.

◆ dump()

void DWARFListTableHeader::dump ( DataExtractor  Data,
raw_ostream OS,
DIDumpOptions  DumpOpts = {} 
) const

◆ extract()

Error DWARFListTableHeader::extract ( DWARFDataExtractor  Data,
uint64_t OffsetPtr 
)

◆ getAddrSize()

uint8_t llvm::DWARFListTableHeader::getAddrSize ( ) const
inline

Definition at line 93 of file DWARFListTable.h.

◆ getFormat()

dwarf::DwarfFormat llvm::DWARFListTableHeader::getFormat ( ) const
inline

Definition at line 99 of file DWARFListTable.h.

◆ getHeaderOffset()

uint64_t llvm::DWARFListTableHeader::getHeaderOffset ( ) const
inline

Definition at line 92 of file DWARFListTable.h.

Referenced by getOffsetEntry().

◆ getHeaderSize()

static uint8_t llvm::DWARFListTableHeader::getHeaderSize ( dwarf::DwarfFormat  Format)
inlinestatic

Return the size of the table header including the length but not including the offsets.

Definition at line 103 of file DWARFListTable.h.

References llvm::dwarf::DWARF32, llvm::dwarf::DWARF64, and llvm_unreachable.

Referenced by dump(), extract(), llvm::DWARFListTableBase< DWARFListType >::getHeaderSize(), getOffsetEntry(), and llvm::DWARFUnit::tryExtractDIEsIfNeeded().

◆ getLength()

uint64_t llvm::DWARFListTableHeader::getLength ( ) const
inline

Definition at line 94 of file DWARFListTable.h.

◆ getListTypeString()

StringRef llvm::DWARFListTableHeader::getListTypeString ( ) const
inline

Definition at line 98 of file DWARFListTable.h.

◆ getOffsetEntry() [1/2]

std::optional< uint64_t > llvm::DWARFListTableHeader::getOffsetEntry ( DataExtractor  Data,
uint32_t  Index 
) const
inline

◆ getOffsetEntry() [2/2]

static std::optional< uint64_t > llvm::DWARFListTableHeader::getOffsetEntry ( DataExtractor  Data,
uint64_t  OffsetTableOffset,
dwarf::DwarfFormat  Format,
uint32_t  Index 
)
inlinestatic

Definition at line 123 of file DWARFListTable.h.

References llvm::Data, llvm::dwarf::DWARF64, and llvm::Offset.

◆ getOffsetEntryCount()

uint32_t llvm::DWARFListTableHeader::getOffsetEntryCount ( ) const
inline

Definition at line 96 of file DWARFListTable.h.

◆ getSectionName()

StringRef llvm::DWARFListTableHeader::getSectionName ( ) const
inline

Definition at line 97 of file DWARFListTable.h.

◆ getVersion()

uint16_t llvm::DWARFListTableHeader::getVersion ( ) const
inline

Definition at line 95 of file DWARFListTable.h.

◆ length()

uint64_t DWARFListTableHeader::length ( ) const

Returns the length of the table, including the length field, or 0 if the length has not been determined (e.g.

because the table has not yet been parsed, or there was a problem in parsing).

Definition at line 105 of file DWARFListTable.cpp.

References llvm::dwarf::getUnitLengthFieldByteSize().

Referenced by extract().


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