10 #ifndef LLVM_LIB_DEBUGINFO_DWARFDIE_H
11 #define LLVM_LIB_DEBUGINFO_DWARFDIE_H
21 class DWARFDebugInfoEntry;
68 return AbbrevDecl->getTag();
69 return dwarf::DW_TAG_null;
115 void dump(
raw_ostream &OS,
unsigned recurseDepth,
unsigned indent = 0)
const;
141 const char *FailValue)
const;
291 iterator
begin()
const;
292 iterator
end()
const;
303 return !(LHS == RHS);
307 std::forward_iterator_tag,
347 #endif // LLVM_LIB_DEBUGINFO_DWARFDIE_H
const DWARFDie & operator*() const
Optional< int64_t > getAttributeValueAsSignedConstant(dwarf::Attribute Attr) const
Extract the specified attribute from this DIE as a signed integer.
DWARFDie getAttributeValueAsReferencedDie(dwarf::Attribute Attr) const
Extract the specified attribute from this DIE as the referenced DIE.
DWARFAddressRangesVector getAddressRanges() const
Get the address ranges for this DIE.
Optional< uint64_t > getHighPC(uint64_t LowPC) const
Get the DW_AT_high_pc attribute value as an address.
std::vector< std::pair< uint64_t, uint64_t > > DWARFAddressRangesVector
DWARFAddressRangesVector - represents a set of absolute address ranges.
Optional< DWARFFormValue > getAttributeValue(dwarf::Attribute Attr) const
Extract the specified attribute from this DIE.
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
void getCallerFrame(uint32_t &CallFile, uint32_t &CallLine, uint32_t &CallColumn) const
Retrieves values of DW_AT_call_file, DW_AT_call_line and DW_AT_call_column from DIE (or zeroes if the...
void collectChildrenAddressRanges(DWARFAddressRangesVector &Ranges) const
Get all address ranges for any DW_TAG_subprogram DIEs in this DIE or any of its children.
bool getLowAndHighPC(uint64_t &LowPC, uint64_t &HighPC) const
Retrieves DW_AT_low_pc and DW_AT_high_pc from CU.
const DWARFDebugInfoEntry * getDebugInfoEntry() const
DINameKind
A DINameKind is passed to name search methods to specify a preference regarding the type of name reso...
bool addressRangeContainsAddress(const uint64_t Address) const
const char * getSubroutineName(DINameKind Kind) const
If a DIE represents a subprogram (or inlined subroutine), returns its mangled name (or short name...
Optional< uint64_t > getAttributeValueAsAddress(dwarf::Attribute Attr) const
Extract the specified attribute from this DIE as an address.
uint32_t getOffset() const
Get the absolute offset into the debug info or types section.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
static GCRegistry::Add< StatepointGC > D("statepoint-example","an example strategy for statepoint")
const char * getAttributeValueAsString(dwarf::Attribute Attr, const char *FailValue) const
Extract the specified attribute from this DIE as a C string.
CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of ...
DWARFDie getParent() const
Get the parent of this DIE object.
Optional< uint64_t > getAttributeValueAsSectionOffset(dwarf::Attribute Attr) const
Extract the specified attribute from this DIE as absolute section offset.
DWARFDie getSibling() const
Get the sibling of this DIE object.
DWARFUnit * getDwarfUnit() const
Utility class that carries the DWARF compile/type unit and the debug info entry in an object...
void getInlinedChainForAddress(const uint64_t Address, SmallVectorImpl< DWARFDie > &InlinedChain) const
Get inlined chain for a given address, rooted at the current DIE.
iterator_range< iterator > children() const
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang","erlang-compatible garbage collector")
Optional< uint64_t > getAttributeValueAsUnsignedConstant(dwarf::Attribute Attr) const
Extract the specified attribute from this DIE as an unsigned integer.
bool operator==(const iterator &X) const
void dump(raw_ostream &OS, unsigned recurseDepth, unsigned indent=0) const
Dump the DIE and all of its attributes to the supplied stream.
DWARFDie getFirstChild() const
Get the first child of this DIE object.
const DWARFAbbreviationDeclaration * getAbbreviationDeclarationPtr() const
Get the abbreviation declaration for this DIE.
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
const char * getName(DINameKind Kind) const
Return the DIE name resolving DW_AT_sepcification or DW_AT_abstract_origin references if necessary...
Optional< uint64_t > getAttributeValueAsReference(dwarf::Attribute Attr) const
Extract the specified attribute from this DIE as absolute DIE Offset.
uint32_t getOffset() const
A range adaptor for a pair of iterators.
Optional< uint64_t > getRangesBaseAttribute() const
Extract the range base attribute from this DIE as absolute section offset.
bool isSubroutineDIE() const
Returns true if DIE represents a subprogram or an inlined subroutine.
bool operator!=(uint64_t V1, const APInt &V2)
bool isSubprogramDIE() const
Returns true if DIE represents a subprogram (not inlined).
const DWARFAbbreviationDeclaration * getAbbreviationDeclarationPtr() const
std::vector< uint8_t > Unit
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
dwarf::Tag getTag() const
DWARFDebugInfoEntry - A DIE with only the minimum required data.
This class implements an extremely fast bulk output stream that can only output to a stream...
bool operator==(uint64_t V1, const APInt &V2)
DWARFDie(DWARFUnit *Unit, const DWARFDebugInfoEntry *D)
bool isNULL() const
Returns true for a valid DIE that terminates a sibling chain.