LLVM 22.0.0git
llvm::DWARFUnitHeader Class Reference

Base class describing the header of any kind of "unit." Some information is specific to certain unit types. More...

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

Public Member Functions

LLVM_ABI Error extract (DWARFContext &Context, const DWARFDataExtractor &debug_info, uint64_t *offset_ptr, DWARFSectionKind SectionKind)
 Parse a unit header from debug_info starting at offset_ptr.
LLVM_ABI Error applyIndexEntry (const DWARFUnitIndex::Entry *Entry)
uint64_t getOffset () const
const dwarf::FormParamsgetFormParams () const
uint16_t getVersion () const
dwarf::DwarfFormat getFormat () const
uint8_t getAddressByteSize () const
uint8_t getRefAddrByteSize () const
uint8_t getDwarfOffsetByteSize () const
uint64_t getLength () const
uint64_t getAbbrOffset () const
std::optional< uint64_tgetDWOId () const
void setDWOId (uint64_t Id)
const DWARFUnitIndex::EntrygetIndexEntry () const
uint64_t getTypeHash () const
uint64_t getTypeOffset () const
uint8_t getUnitType () const
bool isTypeUnit () const
uint8_t getSize () const
uint8_t getUnitLengthFieldByteSize () const
uint64_t getNextUnitOffset () const

Detailed Description

Base class describing the header of any kind of "unit." Some information is specific to certain unit types.

We separate this class out so we can parse the header before deciding what specific kind of unit to construct.

Definition at line 56 of file DWARFUnit.h.

Member Function Documentation

◆ applyIndexEntry()

◆ extract()

◆ getAbbrOffset()

uint64_t llvm::DWARFUnitHeader::getAbbrOffset ( ) const
inline

Definition at line 101 of file DWARFUnit.h.

◆ getAddressByteSize()

uint8_t llvm::DWARFUnitHeader::getAddressByteSize ( ) const
inline

Definition at line 95 of file DWARFUnit.h.

Referenced by extract().

◆ getDwarfOffsetByteSize()

uint8_t llvm::DWARFUnitHeader::getDwarfOffsetByteSize ( ) const
inline

Definition at line 97 of file DWARFUnit.h.

◆ getDWOId()

std::optional< uint64_t > llvm::DWARFUnitHeader::getDWOId ( ) const
inline

Definition at line 102 of file DWARFUnit.h.

◆ getFormat()

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

Definition at line 94 of file DWARFUnit.h.

◆ getFormParams()

const dwarf::FormParams & llvm::DWARFUnitHeader::getFormParams ( ) const
inline

Definition at line 92 of file DWARFUnit.h.

◆ getIndexEntry()

const DWARFUnitIndex::Entry * llvm::DWARFUnitHeader::getIndexEntry ( ) const
inline

Definition at line 107 of file DWARFUnit.h.

◆ getLength()

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

Definition at line 100 of file DWARFUnit.h.

Referenced by applyIndexEntry(), and extract().

◆ getNextUnitOffset()

uint64_t llvm::DWARFUnitHeader::getNextUnitOffset ( ) const
inline

Definition at line 118 of file DWARFUnit.h.

References getUnitLengthFieldByteSize().

Referenced by extract().

◆ getOffset()

uint64_t llvm::DWARFUnitHeader::getOffset ( ) const
inline

Definition at line 91 of file DWARFUnit.h.

◆ getRefAddrByteSize()

uint8_t llvm::DWARFUnitHeader::getRefAddrByteSize ( ) const
inline

Definition at line 96 of file DWARFUnit.h.

◆ getSize()

uint8_t llvm::DWARFUnitHeader::getSize ( ) const
inline

Definition at line 114 of file DWARFUnit.h.

◆ getTypeHash()

uint64_t llvm::DWARFUnitHeader::getTypeHash ( ) const
inline

Definition at line 108 of file DWARFUnit.h.

Referenced by llvm::DWARFTypeUnit::getTypeHash().

◆ getTypeOffset()

uint64_t llvm::DWARFUnitHeader::getTypeOffset ( ) const
inline

Definition at line 109 of file DWARFUnit.h.

Referenced by llvm::DWARFTypeUnit::getTypeOffset().

◆ getUnitLengthFieldByteSize()

uint8_t llvm::DWARFUnitHeader::getUnitLengthFieldByteSize ( ) const
inline

Definition at line 115 of file DWARFUnit.h.

References llvm::dwarf::getUnitLengthFieldByteSize().

Referenced by applyIndexEntry(), extract(), and getNextUnitOffset().

◆ getUnitType()

uint8_t llvm::DWARFUnitHeader::getUnitType ( ) const
inline

Definition at line 110 of file DWARFUnit.h.

◆ getVersion()

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

Definition at line 93 of file DWARFUnit.h.

Referenced by extract().

◆ isTypeUnit()

bool llvm::DWARFUnitHeader::isTypeUnit ( ) const
inline

Definition at line 111 of file DWARFUnit.h.

Referenced by extract().

◆ setDWOId()

void llvm::DWARFUnitHeader::setDWOId ( uint64_t Id)
inline

Definition at line 103 of file DWARFUnit.h.

References assert().


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