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
- public bool applyIndexEntry(const DWARFUnitIndex::Entry * Entry)
- public bool extract(llvm::DWARFContext & Context, const llvm::DWARFDataExtractor & debug_info, uint64_t * offset_ptr, llvm::DWARFSectionKind SectionKind)
- public uint64_t getAbbrOffset() const
- public uint8_t getAddressByteSize() const
- public Optional<uint64_t> getDWOId() const
- public uint8_t getDwarfOffsetByteSize() const
- public const dwarf::FormParams & getFormParams() const
- public dwarf::DwarfFormat getFormat() const
- public const DWARFUnitIndex::Entry * getIndexEntry() const
- public uint64_t getLength() const
- public uint64_t getNextUnitOffset() const
- public uint64_t getOffset() const
- public uint8_t getRefAddrByteSize() const
- public uint8_t getSize() const
- public uint64_t getTypeHash() const
- public uint64_t getTypeOffset() const
- public uint8_t getUnitLengthFieldByteSize() const
- public uint8_t getUnitType() const
- public uint16_t getVersion() const
- public bool isTypeUnit() const
- public void setDWOId(uint64_t Id)
Methods
¶bool applyIndexEntry(
const DWARFUnitIndex::Entry* Entry)
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)
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
uint64_t getAbbrOffset() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:95
¶uint8_t getAddressByteSize() const
uint8_t getAddressByteSize() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:89
¶Optional<uint64_t> getDWOId() const
Optional<uint64_t> getDWOId() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:96
¶uint8_t getDwarfOffsetByteSize() const
uint8_t getDwarfOffsetByteSize() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:91
¶const dwarf::FormParams& getFormParams() const
const dwarf::FormParams& getFormParams() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:86
¶dwarf::DwarfFormat getFormat() const
dwarf::DwarfFormat getFormat() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:88
¶const DWARFUnitIndex::Entry* getIndexEntry() const
const DWARFUnitIndex::Entry* getIndexEntry() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:101
¶uint64_t getLength() const
uint64_t getLength() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:94
¶uint64_t getNextUnitOffset() const
uint64_t getNextUnitOffset() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:112
¶uint64_t getOffset() const
uint64_t getOffset() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:85
¶uint8_t getRefAddrByteSize() const
uint8_t getRefAddrByteSize() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:90
¶uint8_t getSize() const
uint8_t getSize() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:108
¶uint64_t getTypeHash() const
uint64_t getTypeHash() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:102
¶uint64_t getTypeOffset() const
uint64_t getTypeOffset() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:103
¶uint8_t getUnitLengthFieldByteSize() const
uint8_t getUnitLengthFieldByteSize() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:109
¶uint8_t getUnitType() const
uint8_t getUnitType() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:104
¶uint16_t getVersion() const
uint16_t getVersion() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:87
¶bool isTypeUnit() const
bool isTypeUnit() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:105
¶void setDWOId(uint64_t Id)
void setDWOId(uint64_t Id)
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:97
Parameters
- uint64_t Id