10 #ifndef LLVM_LIB_DEBUGINFO_DWARFDEBUGINFOENTRY_H
11 #define LLVM_LIB_DEBUGINFO_DWARFDEBUGINFOENTRY_H
17 #include "llvm/Support/DataTypes.h"
21 class DWARFDebugAranges;
22 class DWARFCompileUnit;
26 struct DWARFDebugInfoEntryInlinedChain;
39 : Offset(0), SiblingIdx(0), AbbrevDecl(nullptr) {}
42 unsigned indent = 0)
const;
44 uint16_t attr, uint16_t form,
unsigned indent = 0)
const;
51 uint32_t
getTag()
const {
return AbbrevDecl ? AbbrevDecl->
getTag() : 0; }
52 bool isNULL()
const {
return AbbrevDecl ==
nullptr; }
66 return SiblingIdx > 0 ?
this + SiblingIdx :
nullptr;
80 SiblingIdx = Sibling -
this;
93 const char *FailValue)
const;
96 uint64_t FailValue)
const;
100 uint64_t FailValue)
const;
103 uint64_t FailValue)
const;
107 uint64_t FailValue)
const;
114 uint64_t &HighPC)
const;
138 uint32_t &CallLine, uint32_t &CallColumn)
const;
DWARFAddressRangesVector getAddressRanges(const DWARFUnit *U) const
const char * getSubroutineName(const DWARFUnit *U, DINameKind Kind) const
If a DIE represents a subprogram (or inlined subroutine), returns its mangled name (or short name...
uint64_t getAttributeValueAsAddress(const DWARFUnit *U, const uint16_t Attr, uint64_t FailValue) const
std::vector< std::pair< uint64_t, uint64_t > > DWARFAddressRangesVector
DWARFAddressRangesVector - represents a set of absolute address ranges.
const char * getName(const DWARFUnit *U, DINameKind Kind) const
Return the DIE name resolving DW_AT_sepcification or DW_AT_abstract_origin references if necessary...
DWARFDebugInfoEntryInlinedChain getInlinedChainForAddress(const DWARFUnit *U, const uint64_t Address) const
Get inlined chain for a given address, rooted at the current DIE.
const DWARFDebugInfoEntryMinimal * getFirstChild() const
uint64_t getRangesBaseAttribute(const DWARFUnit *U, uint64_t FailValue) const
DINameKind
A DINameKind is passed to name search methods to specify a preference regarding the type of name reso...
const char * getAttributeValueAsString(const DWARFUnit *U, const uint16_t Attr, const char *FailValue) const
void collectChildrenAddressRanges(const DWARFUnit *U, DWARFAddressRangesVector &Ranges) const
bool addressRangeContainsAddress(const DWARFUnit *U, const uint64_t Address) const
SmallVector< DWARFDebugInfoEntryMinimal, 4 > DIEs
uint64_t getAttributeValueAsReference(const DWARFUnit *U, const uint16_t Attr, uint64_t FailValue) const
const DWARFAbbreviationDeclaration * getAbbreviationDeclarationPtr() const
DWARFDebugInfoEntryMinimal - A DIE with only the minimum required data.
void dump(raw_ostream &OS, DWARFUnit *u, unsigned recurseDepth, unsigned indent=0) const
const DWARFDebugInfoEntryMinimal * getSibling() const
DWARFDebugInfoEntryInlinedChain()
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
uint64_t getAttributeValueAsUnsignedConstant(const DWARFUnit *U, const uint16_t Attr, uint64_t FailValue) const
uint64_t getAttributeValueAsSectionOffset(const DWARFUnit *U, const uint16_t Attr, uint64_t FailValue) const
uint32_t getOffset() const
void getCallerFrame(const DWARFUnit *U, 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 setSibling(const DWARFDebugInfoEntryMinimal *Sibling)
bool isSubroutineDIE() const
Returns true if DIE represents a subprogram or an inlined subroutine.
void dumpAttribute(raw_ostream &OS, DWARFUnit *u, uint32_t *offset_ptr, uint16_t attr, uint16_t form, unsigned indent=0) const
bool getLowAndHighPC(const DWARFUnit *U, uint64_t &LowPC, uint64_t &HighPC) const
Retrieves DW_AT_low_pc and DW_AT_high_pc from CU.
DWARFDebugInfoEntryMinimal()
const ARM::ArchExtKind Kind
bool isSubprogramDIE() const
Returns true if DIE represents a subprogram (not inlined).
This class implements an extremely fast bulk output stream that can only output to a stream...
bool getAttributeValue(const DWARFUnit *U, const uint16_t Attr, DWARFFormValue &FormValue) const
bool extractFast(const DWARFUnit *U, uint32_t *OffsetPtr)
Extracts a debug info entry, which is a child of a given unit, starting at a given offset...
DWARFDebugInfoEntryInlinedChain - represents a chain of inlined_subroutine DIEs, (possibly ending wit...