LLVM  16.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

bool extract (DWARFContext &Context, const DWARFDataExtractor &debug_info, uint64_t *offset_ptr, DWARFSectionKind SectionKind)
 Parse a unit header from debug_info starting at offset_ptr. More...
 
bool 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
 
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 51 of file DWARFUnit.h.

Member Function Documentation

◆ applyIndexEntry()

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

Definition at line 348 of file DWARFUnit.cpp.

◆ extract()

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

Parse a unit header from debug_info starting at offset_ptr.

Note that SectionKind is used as a hint to guess the unit type for DWARF formats prior to DWARFv5. In DWARFv5 the unit type is explicitly defined in the header and the hint is ignored.

Definition at line 247 of file DWARFUnit.cpp.

◆ getAbbrOffset()

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

Definition at line 95 of file DWARFUnit.h.

◆ getAddressByteSize()

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

Definition at line 89 of file DWARFUnit.h.

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

◆ getDwarfOffsetByteSize()

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

Definition at line 91 of file DWARFUnit.h.

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

◆ getDWOId()

Optional<uint64_t> llvm::DWARFUnitHeader::getDWOId ( ) const
inline

Definition at line 96 of file DWARFUnit.h.

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

◆ getFormat()

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

Definition at line 88 of file DWARFUnit.h.

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

◆ getFormParams()

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

Definition at line 86 of file DWARFUnit.h.

◆ getIndexEntry()

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

Definition at line 101 of file DWARFUnit.h.

◆ getLength()

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

Definition at line 94 of file DWARFUnit.h.

◆ getNextUnitOffset()

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

Definition at line 112 of file DWARFUnit.h.

References getUnitLengthFieldByteSize().

◆ getOffset()

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

Definition at line 85 of file DWARFUnit.h.

◆ getRefAddrByteSize()

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

Definition at line 90 of file DWARFUnit.h.

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

◆ getSize()

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

Definition at line 108 of file DWARFUnit.h.

◆ getTypeHash()

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

Definition at line 102 of file DWARFUnit.h.

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

◆ getTypeOffset()

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

Definition at line 103 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 104 of file DWARFUnit.h.

◆ getVersion()

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

Definition at line 87 of file DWARFUnit.h.

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

◆ isTypeUnit()

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

Definition at line 105 of file DWARFUnit.h.

◆ setDWOId()

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

Definition at line 97 of file DWARFUnit.h.

References assert().


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