LLVM 20.0.0git
Public Member Functions | List of all members
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

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.
 
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 55 of file DWARFUnit.h.

Member Function Documentation

◆ applyIndexEntry()

Error DWARFUnitHeader::applyIndexEntry ( const DWARFUnitIndex::Entry Entry)

◆ extract()

Error DWARFUnitHeader::extract ( DWARFContext Context,
const DWARFDataExtractor debug_info,
uint64_t offset_ptr,
DWARFSectionKind  SectionKind 
)

◆ getAbbrOffset()

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

Definition at line 99 of file DWARFUnit.h.

◆ getAddressByteSize()

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

Definition at line 93 of file DWARFUnit.h.

References llvm::dwarf::FormParams::AddrSize.

Referenced by extract().

◆ getDwarfOffsetByteSize()

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

Definition at line 95 of file DWARFUnit.h.

References llvm::dwarf::FormParams::getDwarfOffsetByteSize().

◆ getDWOId()

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

Definition at line 100 of file DWARFUnit.h.

Referenced by llvm::DWARFUnit::getDWOId().

◆ getFormat()

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

Definition at line 92 of file DWARFUnit.h.

References llvm::dwarf::FormParams::Format.

◆ getFormParams()

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

Definition at line 90 of file DWARFUnit.h.

◆ getIndexEntry()

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

Definition at line 105 of file DWARFUnit.h.

◆ getLength()

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

Definition at line 98 of file DWARFUnit.h.

References llvm::Length.

Referenced by applyIndexEntry(), and extract().

◆ getNextUnitOffset()

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

Definition at line 116 of file DWARFUnit.h.

References getUnitLengthFieldByteSize(), and llvm::Length.

Referenced by extract().

◆ getOffset()

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

Definition at line 89 of file DWARFUnit.h.

◆ getRefAddrByteSize()

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

Definition at line 94 of file DWARFUnit.h.

References llvm::dwarf::FormParams::getRefAddrByteSize().

◆ getSize()

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

Definition at line 112 of file DWARFUnit.h.

◆ getTypeHash()

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

Definition at line 106 of file DWARFUnit.h.

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

◆ getTypeOffset()

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

Definition at line 107 of file DWARFUnit.h.

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

◆ getUnitLengthFieldByteSize()

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

◆ getUnitType()

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

Definition at line 108 of file DWARFUnit.h.

◆ getVersion()

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

Definition at line 91 of file DWARFUnit.h.

References llvm::dwarf::FormParams::Version.

Referenced by extract().

◆ isTypeUnit()

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

Definition at line 109 of file DWARFUnit.h.

Referenced by extract().

◆ setDWOId()

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

Definition at line 101 of file DWARFUnit.h.

References assert().


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