LLVM API Documentation
DWARFDebugInfoEntryMinimal - A DIE with only the minimum required data. More...
#include <DWARFDebugInfoEntry.h>
Public Member Functions | |
DWARFDebugInfoEntryMinimal () | |
void | dump (raw_ostream &OS, const DWARFUnit *u, unsigned recurseDepth, unsigned indent=0) const |
void | dumpAttribute (raw_ostream &OS, const DWARFUnit *u, uint32_t *offset_ptr, uint16_t attr, uint16_t form, unsigned indent=0) const |
bool | extractFast (const DWARFUnit *U, uint32_t *OffsetPtr) |
uint32_t | getTag () const |
bool | isNULL () const |
bool | isSubprogramDIE () const |
Returns true if DIE represents a subprogram (not inlined). More... | |
bool | isSubroutineDIE () const |
uint32_t | getOffset () const |
uint32_t | getNumAttributes () const |
bool | hasChildren () const |
DWARFDebugInfoEntryMinimal * | getParent () |
const DWARFDebugInfoEntryMinimal * | getParent () const |
DWARFDebugInfoEntryMinimal * | getSibling () |
const DWARFDebugInfoEntryMinimal * | getSibling () const |
DWARFDebugInfoEntryMinimal * | getFirstChild () |
const DWARFDebugInfoEntryMinimal * | getFirstChild () const |
void | setParent (DWARFDebugInfoEntryMinimal *parent) |
void | setSibling (DWARFDebugInfoEntryMinimal *sibling) |
const DWARFAbbreviationDeclaration * | getAbbreviationDeclarationPtr () const |
bool | getAttributeValue (const DWARFUnit *U, const uint16_t Attr, DWARFFormValue &FormValue) const |
const char * | getAttributeValueAsString (const DWARFUnit *U, const uint16_t Attr, const char *FailValue) const |
uint64_t | getAttributeValueAsAddress (const DWARFUnit *U, const uint16_t Attr, uint64_t FailValue) const |
uint64_t | getAttributeValueAsUnsignedConstant (const DWARFUnit *U, const uint16_t Attr, uint64_t FailValue) const |
uint64_t | getAttributeValueAsReference (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 |
bool | getLowAndHighPC (const DWARFUnit *U, uint64_t &LowPC, uint64_t &HighPC) const |
void | buildAddressRangeTable (const DWARFUnit *U, DWARFDebugAranges *DebugAranges, uint32_t CUOffsetInAranges) const |
bool | addressRangeContainsAddress (const DWARFUnit *U, const uint64_t Address) const |
const char * | getSubroutineName (const DWARFUnit *U) const |
void | getCallerFrame (const DWARFUnit *U, uint32_t &CallFile, uint32_t &CallLine, uint32_t &CallColumn) const |
DWARFDebugInfoEntryInlinedChain | getInlinedChainForAddress (const DWARFUnit *U, const uint64_t Address) const |
DWARFDebugInfoEntryMinimal - A DIE with only the minimum required data.
Definition at line 27 of file DWARFDebugInfoEntry.h.
|
inline |
Definition at line 40 of file DWARFDebugInfoEntry.h.
bool DWARFDebugInfoEntryMinimal::addressRangeContainsAddress | ( | const DWARFUnit * | U, |
const uint64_t | Address | ||
) | const |
Definition at line 251 of file DWARFDebugInfoEntry.cpp.
References llvm::DWARFDebugRangeList::containsAddress(), llvm::DWARFUnit::extractRangeList(), and llvm::DWARFUnit::getBaseAddress().
Referenced by getInlinedChainForAddress().
void DWARFDebugInfoEntryMinimal::buildAddressRangeTable | ( | const DWARFUnit * | U, |
DWARFDebugAranges * | DebugAranges, | ||
uint32_t | CUOffsetInAranges | ||
) | const |
Definition at line 232 of file DWARFDebugInfoEntry.cpp.
References llvm::DWARFDebugAranges::appendRange(), buildAddressRangeTable(), and getSibling().
Referenced by buildAddressRangeTable().
void DWARFDebugInfoEntryMinimal::dump | ( | raw_ostream & | OS, |
const DWARFUnit * | u, | ||
unsigned | recurseDepth, | ||
unsigned | indent = 0 |
||
) | const |
Definition at line 22 of file DWARFDebugInfoEntry.cpp.
References dump(), llvm::format(), llvm::DWARFUnit::getDebugInfoExtractor(), getSibling(), llvm::DataExtractor::getULEB128(), llvm::raw_ostream::indent(), llvm::DataExtractor::isValidOffset(), and llvm::dwarf::TagString().
Referenced by llvm::DWARFCompileUnit::dump(), llvm::DWARFTypeUnit::dump(), and dump().
void DWARFDebugInfoEntryMinimal::dumpAttribute | ( | raw_ostream & | OS, |
const DWARFUnit * | u, | ||
uint32_t * | offset_ptr, | ||
uint16_t | attr, | ||
uint16_t | form, | ||
unsigned | indent = 0 |
||
) | const |
Extracts a debug info entry, which is a child of a given unit, starting at a given offset. If DIE can't be extracted, returns false and doesn't change OffsetPtr.
Definition at line 95 of file DWARFDebugInfoEntry.cpp.
References llvm::DWARFAbbreviationDeclarationSet::getAbbreviationDeclaration(), llvm::DWARFUnit::getAbbreviations(), llvm::DWARFUnit::getAddressByteSize(), llvm::DWARFUnit::getDebugInfoExtractor(), llvm::DWARFFormValue::getFixedFormSizes(), llvm::DWARFUnit::getNextUnitOffset(), llvm::DataExtractor::getULEB128(), llvm::DWARFUnit::getVersion(), llvm::DataExtractor::isValidOffset(), llvm::ArrayRef< T >::size(), and llvm::DWARFFormValue::skipValue().
Referenced by getSubroutineName().
|
inline |
Definition at line 112 of file DWARFDebugInfoEntry.h.
bool DWARFDebugInfoEntryMinimal::getAttributeValue | ( | const DWARFUnit * | U, |
const uint16_t | Attr, | ||
DWARFFormValue & | FormValue | ||
) | const |
Definition at line 145 of file DWARFDebugInfoEntry.cpp.
References llvm::DWARFFormValue::extractValue(), llvm::DWARFUnit::getDebugInfoExtractor(), llvm::DataExtractor::getULEB128(), and llvm::DWARFFormValue::skipValue().
uint64_t DWARFDebugInfoEntryMinimal::getAttributeValueAsAddress | ( | const DWARFUnit * | U, |
const uint16_t | Attr, | ||
uint64_t | FailValue | ||
) | const |
Definition at line 179 of file DWARFDebugInfoEntry.cpp.
References llvm::DWARFFormValue::getAsAddress(), llvm::Optional< T >::getValue(), and llvm::Optional< T >::hasValue().
uint64_t DWARFDebugInfoEntryMinimal::getAttributeValueAsReference | ( | const DWARFUnit * | U, |
const uint16_t | Attr, | ||
uint64_t | FailValue | ||
) | const |
Definition at line 197 of file DWARFDebugInfoEntry.cpp.
References llvm::DWARFFormValue::getAsReference(), llvm::Optional< T >::getValue(), and llvm::Optional< T >::hasValue().
uint64_t DWARFDebugInfoEntryMinimal::getAttributeValueAsSectionOffset | ( | const DWARFUnit * | U, |
const uint16_t | Attr, | ||
uint64_t | FailValue | ||
) | const |
Definition at line 206 of file DWARFDebugInfoEntry.cpp.
References llvm::DWARFFormValue::getAsSectionOffset(), llvm::Optional< T >::getValue(), and llvm::Optional< T >::hasValue().
Referenced by llvm::DWARFContext::dump(), and llvm::DWARFContext::getLineTableForCompileUnit().
const char * DWARFDebugInfoEntryMinimal::getAttributeValueAsString | ( | const DWARFUnit * | U, |
const uint16_t | Attr, | ||
const char * | FailValue | ||
) | const |
Definition at line 170 of file DWARFDebugInfoEntry.cpp.
References llvm::DWARFFormValue::getAsCString(), llvm::Optional< T >::getValue(), and llvm::Optional< T >::hasValue().
uint64_t DWARFDebugInfoEntryMinimal::getAttributeValueAsUnsignedConstant | ( | const DWARFUnit * | U, |
const uint16_t | Attr, | ||
uint64_t | FailValue | ||
) | const |
Definition at line 188 of file DWARFDebugInfoEntry.cpp.
References llvm::DWARFFormValue::getAsUnsignedConstant(), llvm::Optional< T >::getValue(), and llvm::Optional< T >::hasValue().
void DWARFDebugInfoEntryMinimal::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 they are missing).
Definition at line 304 of file DWARFDebugInfoEntry.cpp.
Referenced by llvm::DWARFContext::getInliningInfoForAddress().
|
inline |
Definition at line 87 of file DWARFDebugInfoEntry.h.
References hasChildren().
|
inline |
Definition at line 90 of file DWARFDebugInfoEntry.h.
References hasChildren().
DWARFDebugInfoEntryInlinedChain DWARFDebugInfoEntryMinimal::getInlinedChainForAddress | ( | const DWARFUnit * | U, |
const uint64_t | Address | ||
) | const |
Get inlined chain for a given address, rooted at the current DIE. Returns empty chain if address is not contained in address range of current DIE.
Definition at line 314 of file DWARFDebugInfoEntry.cpp.
References addressRangeContainsAddress(), llvm::DWARFDebugInfoEntryInlinedChain::DIEs, getSibling(), and llvm::DWARFDebugInfoEntryInlinedChain::U.
Referenced by llvm::DWARFUnit::getInlinedChainForAddress().
bool DWARFDebugInfoEntryMinimal::getLowAndHighPC | ( | const DWARFUnit * | U, |
uint64_t & | LowPC, | ||
uint64_t & | HighPC | ||
) | const |
Retrieves DW_AT_low_pc and DW_AT_high_pc from CU. Returns true if both attributes are present.
Definition at line 215 of file DWARFDebugInfoEntry.cpp.
|
inline |
Definition at line 63 of file DWARFDebugInfoEntry.h.
References llvm::DWARFAbbreviationDeclaration::getNumAttributes(), and isNULL().
|
inline |
Definition at line 62 of file DWARFDebugInfoEntry.h.
|
inline |
Definition at line 70 of file DWARFDebugInfoEntry.h.
Referenced by setSibling().
|
inline |
Definition at line 73 of file DWARFDebugInfoEntry.h.
|
inline |
Definition at line 78 of file DWARFDebugInfoEntry.h.
Referenced by buildAddressRangeTable(), dump(), and getInlinedChainForAddress().
|
inline |
Definition at line 81 of file DWARFDebugInfoEntry.h.
const char * DWARFDebugInfoEntryMinimal::getSubroutineName | ( | const DWARFUnit * | U | ) | const |
If a DIE represents a subprogram (or inlined subroutine), returns its mangled name (or short name, if mangled is missing). This name may be fetched from specification or abstract origin for this subprogram. Returns null if no name is found.
Definition at line 270 of file DWARFDebugInfoEntry.cpp.
References extractFast(), and getSubroutineName().
Referenced by llvm::DWARFContext::getInliningInfoForAddress(), llvm::DWARFContext::getLineInfoForAddress(), llvm::DWARFContext::getLineInfoForAddressRange(), and getSubroutineName().
|
inline |
Definition at line 53 of file DWARFDebugInfoEntry.h.
References llvm::DWARFAbbreviationDeclaration::getTag().
|
inline |
Definition at line 66 of file DWARFDebugInfoEntry.h.
References llvm::DWARFAbbreviationDeclaration::hasChildren(), and isNULL().
Referenced by getFirstChild().
|
inline |
Definition at line 54 of file DWARFDebugInfoEntry.h.
Referenced by getNumAttributes(), and hasChildren().
bool DWARFDebugInfoEntryMinimal::isSubprogramDIE | ( | ) | const |
Returns true if DIE represents a subprogram (not inlined).
Definition at line 135 of file DWARFDebugInfoEntry.cpp.
bool DWARFDebugInfoEntryMinimal::isSubroutineDIE | ( | ) | const |
Returns true if DIE represents a subprogram or an inlined subroutine.
Definition at line 139 of file DWARFDebugInfoEntry.cpp.
|
inline |
Definition at line 94 of file DWARFDebugInfoEntry.h.
Referenced by setSibling().
|
inline |
Definition at line 102 of file DWARFDebugInfoEntry.h.
References getParent(), and setParent().