A DWARF compile or type unit and its parsed DIEs.

Synopsis

Declared in <llvm/DebugInfo/DWARF/DWARFUnit.h>

class DWARFUnit;

Member Functions

Name

Description

DWARFUnit [constructor]

Construct a unit for Section using Header and related DWARF sections.

~DWARFUnit [destructor] [virtual]

Destroy this unit and release owned DWO state.

clear

Clear parsed DIE and abbreviation state for this unit.

clearDWO

Release the DWO context owned by this skeleton unit.

collectAddressRanges

Collect address ranges covered by this unit's DIE tree.

dies

Return an iterator range over this unit's DIEs, extracting them if needed.

dump [virtual]

Dump this unit to OS using the given dump options.

extractRangeList

Extract a range list from .debug_ranges for this compile unit.

findLoclistFromOffset

Return location expressions from the loclist at offset Offset.

findRnglistFromIndex

Return address ranges from the indexed range list at Index.

findRnglistFromOffset

Return address ranges from the range list at offset Offset.

getAbbrOffset

Offset of this unit's abbreviations within .debug_abbrev.

getAbbreviations

Abbreviation set for this unit, or nullptr if unavailable.

getAbbreviationsOffset

Offset of this unit's abbreviation set within .debug_abbrev.

getAddrOffsetSectionBase

Base offset of this unit's contribution within .debug_addr, if set.

getAddrOffsetSectionItem

Look up address Index in this unit's .debug_addr contribution.

getAddressByteSize

Address size in bytes for this unit.

getBaseAddress

Unit base address from DW_AT_low_pc or DW_AT_entry_pc, if present.

getCompilationDir

Return the DW_AT_comp_dir compilation directory string, or nullptr if absent.

getContext

Return the DWARF context that owns this unit.

getDIEAtIndex

Return the DIE object at the given index Index.

getDIEForOffset

Return the DIE object for a given offset Offset inside the unit's DIE vector.

getDIEIndex

Return the index of a DIE inside the unit's DIE vector.

getDIEIndexForOffset

Return the DIE index for a given offset Offset inside the unit's DIE vector.

getDWO

Return the split unit this skeleton unit currently owns, or null if its DWO context is not open.

getDWOId

DWO ID from the unit DIE/header for split DWARF, if present.

getDebugInfoExtractor

Data extractor over this unit's .debug_info/.debug_types bytes.

getDwarfOffsetByteSize

Byte size of a DWARF section offset for this unit's format (4 or 8).

getDwarfStringOffsetsByteSize

Byte size of one entry in this unit's string‐offsets contribution.

getFirstChild

Return the first child DIE of Die, or an invalid DIE if it has none.

getFormParams

Form parameters (version, address size, format) for this unit.

getFormat

DWARF format (32‐ or 64‐bit) of this unit.

getHeaderSize

Size in bytes of the parsed unit header.

getIndexedAddressOffset

Returns offset to the indexed address value inside .debug_addr section.

getInfoSection

Section containing this unit's .debug_info/.debug_types data.

getInlinedChainForAddress

Fetch the inlined call chain for a given address.

getLastChild

Return the last child DIE of Die (the terminating null), or invalid if none.

getLength

Length of this unit's contribution from the unit header.

getLineSection

Return the .debug_line section associated with this unit.

getLineTableOffset

Offset of this unit's .debug_line contribution from the package index, or 0.

getLinkedUnit

Return this unit, or its skeleton unit when this is a split DWO unit.

getLocSectionBase

Base offset of this unit's contribution within the location section.

getLocationTable

Location list table for this unit.

getLoclistOffset

Return a loclist's offset based on index Index (DW_FORM_loclistx).

getNextUnitOffset

Absolute section offset of the unit that follows this one.

getNonSkeletonUnitDIE

Return the split/DWO unit DIE when available, otherwise this unit's DIE.

getNumDIEs

Returns the number of DIEs in the unit. Parses the unit if necessary.

getOffset

Byte offset of this unit within its info/types section.

getParent

Return the parent DIE of Die, or an invalid DIE if it has none.

getPreviousSibling

Return the previous sibling DIE of Die, or an invalid DIE if none.

getRefAddrByteSize

Byte size of a DW_FORM_ref_addr value for this unit.

getRnglistOffset

Return a rangelist's offset based on an index.

getSibling

Return the next sibling DIE of Die, or an invalid DIE if none.

getStringExtractor

Data extractor over this unit's .debug_str section bytes.

getStringOffsetSection

Return the .debug_str_offsets section associated with this unit.

getStringOffsetSectionItem

Look up string‐offset Index in this unit's .debug_str_offsets contribution.

getStringOffsetsBase

Base offset of this unit's contribution to .debug_str_offsets.

getStringOffsetsTableContribution

Return this unit's contribution to .debug_str_offsets (extracting the CU DIE if needed).

getStringSection

Return the .debug_str section associated with this unit.

getSubroutineForAddress

Return the subprogram DIE whose address range covers Address.

getUnitDIE

Return the root unit DIE, optionally extracting only that DIE.

getUnitType

DWARF unit type (e.g. DW_UT_compile) from the unit header.

getUnitVector

Return the DWARFUnitVector containing this unit.

getVariableForAddress

Return the variable DIE for address Address.

getVersion

DWARF version number from this unit's header.

isDWOUnit

True if this unit came from a .dwo/.dwp split DWARF object.

isLittleEndian

True if this unit's data is little‐endian.

isTypeUnit

True if this is a type unit (including split type units).

setAddrOffsetSection

Set the .debug_addr section and this unit's base offset within it.

setDWOId

Set the DWO ID on this unit's header.

setRangesSection

Set the .debug_ranges/.debug_rnglists section and this unit's base offset.

setSkeletonUnit

Associate skeleton unit SU with this split/DWO unit.

tryExtractDIEsIfNeeded

Parse this unit's DIEs if needed; return an error instead of reporting it.

updateAddressDieMap

Recursively update address to Die map.

updateVariableDieMap

Recursively update address to variable Die map.

Static Member Functions

Name

Description

isMatchingUnitTypeAndTag

True if DIE tag Tag is valid for unit type UnitType.

Protected Member Functions

Name

Description

determineStringOffsetsTableContribution

Find this unit's contribution to the string offsets table.

determineStringOffsetsTableContributionDWO

Find this DWO/DWP unit's contribution to the string offsets table.

getDIEIndex

Return the index of a Die entry inside the unit's DIE vector.

getDebugInfoEntry

Return DWARFDebugInfoEntry for the specified index Index.

getFirstChildEntry

Return the first child entry of Die, or nullptr.

getHeader

Return this unit's parsed header.

getLastChildEntry

Return the last child entry of Die, or nullptr.

getParentEntry

Return the parent debug‐info entry of Die, or nullptr.

getPreviousSiblingEntry

Return the previous sibling entry of Die, or nullptr.

getSiblingEntry

Return the next sibling entry of Die, or nullptr.

Friends

Name

Description

llvm::dwarf_linker::parallel::CompileUnit

A DWARF compile unit specialization used by the parallel linker.

Non-Member Functions

Name

Description

prettyPrintRegisterOp

Pretty print a register opcode and operands.

Derived Classes

Name

Description

DWARFCompileUnit

A DWARF compile unit and its parsed DIEs.

DWARFTypeUnit

A DWARF type unit and its parsed DIEs.

Created with MrDocs