class DWARFUnitHeader

Declaration

class DWARFUnitHeader { /* full declaration omitted */ };

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.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:51

Member Variables

private uint64_t Offset = 0
private dwarf::FormParams FormParams
private uint64_t Length = 0
private uint64_t AbbrOffset = 0
private const DWARFUnitIndex::Entry* IndexEntry = nullptr
private uint64_t TypeHash = 0
private uint64_t TypeOffset = 0
private Optional<uint64_t> DWOId
private uint8_t UnitType = 0
private uint8_t Size = 0

Method Overview

Methods

bool applyIndexEntry(
    const DWARFUnitIndex::Entry* Entry)

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:84

Parameters

const DWARFUnitIndex::Entry* Entry

bool extract(
    llvm::DWARFContext& Context,
    const llvm::DWARFDataExtractor& debug_info,
    uint64_t* offset_ptr,
    llvm::DWARFSectionKind SectionKind)

Description

Parse a unit header from \p debug_info starting at \p offset_ptr. Note that \p 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.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:80

Parameters

llvm::DWARFContext& Context
const llvm::DWARFDataExtractor& debug_info
uint64_t* offset_ptr
llvm::DWARFSectionKind SectionKind

uint64_t getAbbrOffset() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:95

uint8_t getAddressByteSize() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:89

Optional<uint64_t> getDWOId() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:96

uint8_t getDwarfOffsetByteSize() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:91

const dwarf::FormParams& getFormParams() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:86

dwarf::DwarfFormat getFormat() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:88

const DWARFUnitIndex::Entry* getIndexEntry() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:101

uint64_t getLength() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:94

uint64_t getNextUnitOffset() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:112

uint64_t getOffset() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:85

uint8_t getRefAddrByteSize() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:90

uint8_t getSize() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:108

uint64_t getTypeHash() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:102

uint64_t getTypeOffset() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:103

uint8_t getUnitLengthFieldByteSize() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:109

uint8_t getUnitType() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:104

uint16_t getVersion() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:87

bool isTypeUnit() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:105

void setDWOId(uint64_t Id)

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:97

Parameters

uint64_t Id