LLVM  7.0.0
Public Member Functions | Static Public Attributes | List of all members
llvm::DWARFTypeUnit Class Reference

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

Inheritance diagram for llvm::DWARFTypeUnit:
[legend]
Collaboration diagram for llvm::DWARFTypeUnit:
[legend]

Public Member Functions

 DWARFTypeUnit (DWARFContext &Context, const DWARFSection &Section, const DWARFUnitHeader &Header, const DWARFDebugAbbrev *DA, const DWARFSection *RS, StringRef SS, const DWARFSection &SOS, const DWARFSection *AOS, const DWARFSection &LS, bool LE, bool IsDWO, const DWARFUnitSectionBase &UnitSection)
 
uint64_t getTypeHash () const
 
uint32_t getTypeOffset () const
 
void dump (raw_ostream &OS, DIDumpOptions DumpOpts={})
 
- Public Member Functions inherited from llvm::DWARFUnit
 DWARFUnit (DWARFContext &Context, const DWARFSection &Section, const DWARFUnitHeader &Header, const DWARFDebugAbbrev *DA, const DWARFSection *RS, StringRef SS, const DWARFSection &SOS, const DWARFSection *AOS, const DWARFSection &LS, bool LE, bool IsDWO, const DWARFUnitSectionBase &UnitSection)
 
virtual ~DWARFUnit ()
 
DWARFContext & getContext () const
 
uint32_t getOffset () const
 
const dwarf::FormParams & getFormParams () const
 
uint16_t getVersion () const
 
uint8_t getAddressByteSize () const
 
uint8_t getRefAddrByteSize () const
 
uint8_t getDwarfOffsetByteSize () const
 
uint32_t getLength () const
 
uint8_t getUnitType () const
 
uint32_t getNextUnitOffset () const
 
const DWARFSection & getLineSection () const
 
StringRef getStringSection () const
 
const DWARFSection & getStringOffsetSection () const
 
void setAddrOffsetSection (const DWARFSection *AOS, uint32_t Base)
 
void updateAddressDieMap (DWARFDie Die)
 Recursively update address to Die map. More...
 
void setRangesSection (const DWARFSection *RS, uint32_t Base)
 
bool getAddrOffsetSectionItem (uint32_t Index, uint64_t &Result) const
 
bool getStringOffsetSectionItem (uint32_t Index, uint64_t &Result) const
 
DWARFDataExtractor getDebugInfoExtractor () const
 
DataExtractor getStringExtractor () const
 
Error extractRangeList (uint32_t RangeListOffset, DWARFDebugRangeList &RangeList) const
 Extract the range list referenced by this compile unit from the .debug_ranges section. More...
 
void clear ()
 
const Optional< StrOffsetsContributionDescriptor > & getStringOffsetsTableContribution () const
 
uint8_t getDwarfStringOffsetsByteSize () const
 
uint64_t getStringOffsetsBase () const
 
const DWARFAbbreviationDeclarationSet * getAbbreviations () const
 
llvm::Optional< BaseAddress > getBaseAddress ()
 
DWARFDie getUnitDIE (bool ExtractUnitDIEOnly=true)
 
const char * getCompilationDir ()
 
Optional< uint64_t > getDWOId ()
 
void setDWOId (uint64_t NewID)
 
Expected< DWARFAddressRangesVector > findRnglistFromOffset (uint32_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. More...
 
Expected< DWARFAddressRangesVector > findRnglistFromIndex (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). More...
 
Optional< uint32_t > getRnglistOffset (uint32_t Index)
 Return a rangelist's offset based on an index. More...
 
void collectAddressRanges (DWARFAddressRangesVector &CURanges)
 
DWARFDie getSubroutineForAddress (uint64_t Address)
 Returns subprogram DIE with address range encompassing the provided address. More...
 
void getInlinedChainForAddress (uint64_t Address, SmallVectorImpl< DWARFDie > &InlinedChain)
 getInlinedChainForAddress - fetches inlined chain for a given address. More...
 
const DWARFUnitSectionBase & getUnitSection () const
 getUnitSection - Return the DWARFUnitSection containing this unit. More...
 
unsigned getNumDIEs ()
 Returns the number of DIEs in the unit. More...
 
uint32_t getDIEIndex (const DWARFDie &D)
 Return the index of a DIE inside the unit's DIE vector. More...
 
DWARFDie getDIEAtIndex (unsigned Index)
 Return the DIE object at the given index. More...
 
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 (uint32_t Offset)
 Return the DIE object for a given offset inside the unit's DIE vector. More...
 
uint32_t getLineTableOffset () const
 
die_iterator_range dies ()
 

Static Public Attributes

static const DWARFSectionKind Section = DW_SECT_TYPES
 

Additional Inherited Members

- Static Public Member Functions inherited from llvm::DWARFUnit
static bool isMatchingUnitTypeAndTag (uint8_t UnitType, dwarf::Tag Tag)
 
static uint32_t getDWARF5HeaderSize (uint8_t UnitType)
 Return the number of bytes for the header of a unit of UnitType type. More...
 
- Protected Member Functions inherited from llvm::DWARFUnit
const DWARFUnitHeader & getHeader () const
 
uint32_t getHeaderSize () const
 Size in bytes of the parsed unit header. More...
 
Optional< StrOffsetsContributionDescriptor > determineStringOffsetsTableContribution (DWARFDataExtractor &DA, uint64_t Offset)
 Find the unit's contribution to the string offsets table and determine its length and form. More...
 
Optional< StrOffsetsContributionDescriptor > determineStringOffsetsTableContributionDWO (DWARFDataExtractor &DA, uint64_t Offset)
 Find the unit's contribution to the string offsets table and determine its length and form. More...
 

Detailed Description

Definition at line 26 of file DWARFTypeUnit.h.

Constructor & Destructor Documentation

◆ DWARFTypeUnit()

llvm::DWARFTypeUnit::DWARFTypeUnit ( DWARFContext &  Context,
const DWARFSection &  Section,
const DWARFUnitHeader &  Header,
const DWARFDebugAbbrev *  DA,
const DWARFSection *  RS,
StringRef  SS,
const DWARFSection &  SOS,
const DWARFSection *  AOS,
const DWARFSection &  LS,
bool  LE,
bool  IsDWO,
const DWARFUnitSectionBase &  UnitSection 
)
inline

Definition at line 28 of file DWARFTypeUnit.h.

Member Function Documentation

◆ dump()

void DWARFTypeUnit::dump ( raw_ostream &  OS,
DIDumpOptions  DumpOpts = {} 
)

◆ getTypeHash()

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

Definition at line 37 of file DWARFTypeUnit.h.

References llvm::DWARFUnit::getHeader(), and llvm::DWARFUnitHeader::getTypeHash().

Referenced by dump().

◆ getTypeOffset()

uint32_t llvm::DWARFTypeUnit::getTypeOffset ( ) const
inline

Definition at line 38 of file DWARFTypeUnit.h.

References dump(), llvm::DWARFUnit::getHeader(), and llvm::DWARFUnitHeader::getTypeOffset().

Referenced by dump().

Member Data Documentation

◆ Section

const DWARFSectionKind llvm::DWARFTypeUnit::Section = DW_SECT_TYPES
static

Definition at line 41 of file DWARFTypeUnit.h.


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