LLVM 24.0.0git
llvm::DWARFCompileUnit Class Reference

#include "llvm/DebugInfo/DWARF/DWARFCompileUnit.h"

Inheritance diagram for llvm::DWARFCompileUnit:
[legend]

Public Member Functions

 DWARFCompileUnit (DWARFContext &Context, const DWARFSection &Section, const DWARFUnitHeader &Header, const DWARFDebugAbbrev *DA, const DWARFSection *RS, const DWARFSection *LocSection, StringRef SS, const DWARFSection &SOS, const DWARFSection *AOS, const DWARFSection &LS, bool LE, bool IsDWO, const DWARFUnitVector &UnitVector)
 ~DWARFCompileUnit () override
 VTable anchor.
void dump (raw_ostream &OS, DIDumpOptions DumpOpts) override
 Dump this compile unit to OS.
Public Member Functions inherited from llvm::DWARFUnit
 DWARFUnit (DWARFContext &Context, const DWARFSection &Section, const DWARFUnitHeader &Header, const DWARFDebugAbbrev *DA, const DWARFSection *RS, const DWARFSection *LocSection, StringRef SS, const DWARFSection &SOS, const DWARFSection *AOS, const DWARFSection &LS, bool LE, bool IsDWO, const DWARFUnitVector &UnitVector)
virtual ~DWARFUnit ()
bool isLittleEndian () const
bool isDWOUnit () const
DWARFContextgetContext () const
const DWARFSectiongetInfoSection () const
uint64_t getOffset () const
const dwarf::FormParamsgetFormParams () const
uint16_t getVersion () const
uint8_t getAddressByteSize () const
uint8_t getRefAddrByteSize () const
uint8_t getDwarfOffsetByteSize () const
uint32_t getHeaderSize () const
 Size in bytes of the parsed unit header.
uint64_t getLength () const
dwarf::DwarfFormat getFormat () const
uint8_t getUnitType () const
bool isTypeUnit () const
uint64_t getAbbrOffset () const
uint64_t getNextUnitOffset () const
const DWARFSectiongetLineSection () const
StringRef getStringSection () const
const DWARFSectiongetStringOffsetSection () const
void setSkeletonUnit (DWARFUnit *SU)
DWARFUnitgetLinkedUnit ()
void setAddrOffsetSection (const DWARFSection *AOS, uint64_t Base)
std::optional< uint64_tgetAddrOffsetSectionBase () const
std::optional< uint64_tgetIndexedAddressOffset (uint64_t Index)
 Returns offset to the indexed address value inside .debug_addr section.
void updateAddressDieMap (DWARFDie Die)
 Recursively update address to Die map.
void updateVariableDieMap (DWARFDie Die)
 Recursively update address to variable Die map.
void setRangesSection (const DWARFSection *RS, uint64_t Base)
uint64_t getLocSectionBase () const
std::optional< object::SectionedAddressgetAddrOffsetSectionItem (uint32_t Index) const
Expected< uint64_tgetStringOffsetSectionItem (uint32_t Index) const
DWARFDataExtractor getDebugInfoExtractor () const
DataExtractor getStringExtractor () const
const DWARFLocationTablegetLocationTable ()
Error extractRangeList (uint64_t RangeListOffset, DWARFDebugRangeList &RangeList) const
 Extract the range list referenced by this compile unit from the .debug_ranges section.
void clear ()
const std::optional< StrOffsetsContributionDescriptor > & getStringOffsetsTableContribution ()
uint8_t getDwarfStringOffsetsByteSize () const
uint64_t getStringOffsetsBase () const
uint64_t getAbbreviationsOffset () const
const DWARFAbbreviationDeclarationSetgetAbbreviations () const
std::optional< object::SectionedAddressgetBaseAddress ()
DWARFDie getUnitDIE (bool ExtractUnitDIEOnly=true)
DWARFDie getNonSkeletonUnitDIE (bool ExtractUnitDIEOnly=true, StringRef DWOAlternativeLocation={})
DWARFUnitgetDWO () const
 Return the split unit this skeleton unit currently owns, or null if its DWO context is not open.
void clearDWO ()
 Release the DWO context owned by this skeleton unit, freeing the memory held by its DWARFContext and parsed unit vector.
const chargetCompilationDir ()
std::optional< uint64_tgetDWOId ()
void setDWOId (uint64_t NewID)
Expected< DWARFAddressRangesVectorfindRnglistFromOffset (uint64_t Offset)
 Return a vector of address ranges resulting from a (possibly encoded) range list starting at a given offset in the appropriate ranges section.
Expected< DWARFAddressRangesVectorfindRnglistFromIndex (uint32_t Index)
 Return a vector of address ranges retrieved from an encoded range list whose offset is found via a table lookup given an index (DWARF v5 and later).
std::optional< uint64_tgetRnglistOffset (uint32_t Index)
 Return a rangelist's offset based on an index.
std::optional< uint64_tgetLoclistOffset (uint32_t Index)
Expected< DWARFAddressRangesVectorcollectAddressRanges ()
Expected< DWARFLocationExpressionsVectorfindLoclistFromOffset (uint64_t Offset)
DWARFDie getSubroutineForAddress (uint64_t Address)
 Returns subprogram DIE with address range encompassing the provided address.
DWARFDie getVariableForAddress (uint64_t Address)
 Returns variable DIE for the address provided.
void getInlinedChainForAddress (uint64_t Address, SmallVectorImpl< DWARFDie > &InlinedChain)
 getInlinedChainForAddress - fetches inlined chain for a given address.
const DWARFUnitVectorgetUnitVector () const
 Return the DWARFUnitVector containing this unit.
unsigned getNumDIEs ()
 Returns the number of DIEs in the unit.
uint32_t getDIEIndex (const DWARFDie &D) const
 Return the index of a DIE inside the unit's DIE vector.
DWARFDie getDIEAtIndex (unsigned Index)
 Return the DIE object at the given index Index.
DWARFDie getParent (const DWARFDebugInfoEntry *Die)
DWARFDie getSibling (const DWARFDebugInfoEntry *Die)
DWARFDie getPreviousSibling (const DWARFDebugInfoEntry *Die)
DWARFDie getFirstChild (const DWARFDebugInfoEntry *Die)
DWARFDie getLastChild (const DWARFDebugInfoEntry *Die)
DWARFDie getDIEForOffset (uint64_t Offset)
 Return the DIE object for a given offset Offset inside the unit's DIE vector.
std::optional< uint32_tgetDIEIndexForOffset (uint64_t Offset)
 Return the DIE index for a given offset Offset inside the unit's DIE vector.
uint32_t getLineTableOffset () const
die_iterator_range dies ()
Error tryExtractDIEsIfNeeded (bool CUDieOnly)

Static Public Member Functions

static bool classof (const DWARFUnit *U)
 Enable LLVM-style RTTI.
Static Public Member Functions inherited from llvm::DWARFUnit
static bool isMatchingUnitTypeAndTag (uint8_t UnitType, dwarf::Tag Tag)

Additional Inherited Members

Protected Member Functions inherited from llvm::DWARFUnit
uint32_t getDIEIndex (const DWARFDebugInfoEntry *Die) const
 Return the index of a Die entry inside the unit's DIE vector.
const DWARFDebugInfoEntrygetDebugInfoEntry (unsigned Index) const
 Return DWARFDebugInfoEntry for the specified index Index.
const DWARFDebugInfoEntrygetParentEntry (const DWARFDebugInfoEntry *Die) const
const DWARFDebugInfoEntrygetSiblingEntry (const DWARFDebugInfoEntry *Die) const
const DWARFDebugInfoEntrygetPreviousSiblingEntry (const DWARFDebugInfoEntry *Die) const
const DWARFDebugInfoEntrygetFirstChildEntry (const DWARFDebugInfoEntry *Die) const
const DWARFDebugInfoEntrygetLastChildEntry (const DWARFDebugInfoEntry *Die) const
const DWARFUnitHeadergetHeader () const
Expected< std::optional< StrOffsetsContributionDescriptor > > determineStringOffsetsTableContribution (DWARFDataExtractor &DA)
 Find the unit's contribution to the string offsets table and determine its length and form.
Expected< std::optional< StrOffsetsContributionDescriptor > > determineStringOffsetsTableContributionDWO (DWARFDataExtractor &DA)
 Find the unit's contribution to the string offsets table and determine its length and form.

Detailed Description

Definition at line 23 of file DWARFCompileUnit.h.

Constructor & Destructor Documentation

◆ DWARFCompileUnit()

llvm::DWARFCompileUnit::DWARFCompileUnit ( DWARFContext & Context,
const DWARFSection & Section,
const DWARFUnitHeader & Header,
const DWARFDebugAbbrev * DA,
const DWARFSection * RS,
const DWARFSection * LocSection,
StringRef SS,
const DWARFSection & SOS,
const DWARFSection * AOS,
const DWARFSection & LS,
bool LE,
bool IsDWO,
const DWARFUnitVector & UnitVector )
inline

Definition at line 25 of file DWARFCompileUnit.h.

References llvm::DWARFUnit::DWARFUnit().

◆ ~DWARFCompileUnit()

DWARFCompileUnit::~DWARFCompileUnit ( )
overridedefault

VTable anchor.

References dump().

Member Function Documentation

◆ classof()

bool llvm::DWARFCompileUnit::classof ( const DWARFUnit * U)
inlinestatic

Enable LLVM-style RTTI.

Definition at line 39 of file DWARFCompileUnit.h.

References llvm::DWARFUnit::DWARFUnit().

◆ dump()


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