|
LLVM
4.0.0
|
#include <DWARFUnit.h>
Protected Member Functions | |
| virtual bool | extractImpl (DataExtractor debug_info, uint32_t *offset_ptr) |
| virtual uint32_t | getHeaderSize () const |
| Size in bytes of the unit header. More... | |
Definition at line 106 of file DWARFUnit.h.
| llvm::DWARFUnit::DWARFUnit | ( | DWARFContext & | Context, |
| const DWARFSection & | Section, | ||
| const DWARFDebugAbbrev * | DA, | ||
| StringRef | RS, | ||
| StringRef | SS, | ||
| StringRef | SOS, | ||
| StringRef | AOS, | ||
| StringRef | LS, | ||
| bool | LE, | ||
| bool | IsDWO, | ||
| const DWARFUnitSectionBase & | UnitSection, | ||
| const DWARFUnitIndex::Entry * | IndexEntry = nullptr |
||
| ) |
Definition at line 46 of file DWARFUnit.cpp.
References C, llvm::DW_SECT_STR_OFFSETS, llvm::DWARFUnitIndex::Entry::getOffset(), and llvm::StringRef::slice().
|
virtualdefault |
| void llvm::DWARFUnit::clear | ( | ) |
Definition at line 140 of file DWARFUnit.cpp.
Referenced by extract().
| void llvm::DWARFUnit::collectAddressRanges | ( | DWARFAddressRangesVector & | CURanges | ) |
Definition at line 311 of file DWARFUnit.cpp.
References llvm::DWARFDie::collectChildrenAddressRanges(), llvm::DWARFDie::getAddressRanges(), and getUnitDIE().
|
inline |
Definition at line 299 of file DWARFUnit.h.
| bool llvm::DWARFUnit::extract | ( | DataExtractor | debug_info, |
| uint32_t * | offset_ptr | ||
| ) |
Definition at line 115 of file DWARFUnit.cpp.
References clear(), extractImpl(), and llvm::DataExtractor::isValidOffset().
|
protectedvirtual |
Reimplemented in llvm::DWARFTypeUnit.
Definition at line 87 of file DWARFUnit.cpp.
References llvm::DW_SECT_ABBREV, llvm::DWARFDebugAbbrev::getAbbreviationDeclarationSet(), getNextUnitOffset(), llvm::DWARFUnitIndex::Entry::getOffset(), llvm::DataExtractor::getU16(), llvm::DataExtractor::getU32(), llvm::DataExtractor::getU8(), llvm::DWARFContext::isSupportedVersion(), llvm::DataExtractor::isValidOffset(), and llvm::DWARFUnitIndex::Entry::SectionContribution::Offset.
Referenced by extract(), and llvm::DWARFTypeUnit::extractImpl().
| bool llvm::DWARFUnit::extractRangeList | ( | uint32_t | RangeListOffset, |
| DWARFDebugRangeList & | RangeList | ||
| ) | const |
extractRangeList - extracts the range list referenced by this compile unit from .debug_ranges section.
Returns true on success. Requires that compile unit is already extracted.
Definition at line 131 of file DWARFUnit.cpp.
References assert(), and llvm::DWARFDebugRangeList::extract().
Referenced by llvm::DWARFDie::getAddressRanges().
|
inline |
Definition at line 208 of file DWARFUnit.h.
Referenced by llvm::DWARFCompileUnit::dump(), llvm::DWARFTypeUnit::dump(), and llvm::DWARFDebugInfoEntry::extractFast().
|
inline |
Definition at line 211 of file DWARFUnit.h.
Referenced by llvm::DWARFCompileUnit::dump(), llvm::DWARFTypeUnit::dump(), and llvm::DWARFContext::getLineTableForUnit().
Definition at line 65 of file DWARFUnit.cpp.
References llvm::DataExtractor::getAddress(), and llvm::StringRef::size().
|
inline |
Definition at line 222 of file DWARFUnit.h.
Referenced by llvm::DWARFDie::getAddressRanges().
| const char * llvm::DWARFUnit::getCompilationDir | ( | ) |
Definition at line 153 of file DWARFUnit.cpp.
References llvm::DWARFDie::getAttributeValueAsString(), and getUnitDIE().
Referenced by llvm::DWARFContext::getInliningInfoForAddress(), llvm::DWARFContext::getLineInfoForAddress(), and llvm::DWARFContext::getLineInfoForAddressRange().
|
inline |
Definition at line 166 of file DWARFUnit.h.
|
inline |
Definition at line 184 of file DWARFUnit.h.
References llvm::DWARFSection::Data.
Referenced by llvm::DWARFDie::dump(), llvm::DWARFDebugInfoEntry::extractFast(), and llvm::DWARFAbbreviationDeclaration::getAttributeValue().
Return the DIE object at the given index.
Definition at line 267 of file DWARFUnit.h.
References assert().
Return the DIE object for a given offset inside the unit's DIE vector.
The unit needs to have its DIEs extracted for this method to work.
Definition at line 279 of file DWARFUnit.h.
References assert().
Referenced by llvm::DWARFTypeUnit::dump(), and llvm::DWARFDie::getAttributeValueAsReferencedDie().
Return the index of a DIE inside the unit's DIE vector.
It is illegal to call this method with a DIE that hasn't be created by this unit. In other word, it's illegal to call this method on a DIE that isn't accessible by following children/sibling links starting from this unit's getUnitDIE().
Definition at line 262 of file DWARFUnit.h.
References llvm::DWARFDie::getDebugInfoEntry().
|
inline |
Definition at line 217 of file DWARFUnit.h.
References llvm::dwarf::DWARF64, and getFormat().
Referenced by getRefAddrByteSize().
| Optional< uint64_t > llvm::DWARFUnit::getDWOId | ( | ) |
Definition at line 157 of file DWARFUnit.cpp.
References llvm::DWARFDie::getAttributeValueAsUnsignedConstant(), and getUnitDIE().
|
inline |
Definition at line 205 of file DWARFUnit.h.
References llvm::dwarf::DWARF32.
Referenced by getDwarfOffsetByteSize().
|
inlineprotectedvirtual |
Size in bytes of the unit header.
Reimplemented in llvm::DWARFTypeUnit.
Definition at line 155 of file DWARFUnit.h.
Referenced by llvm::DWARFTypeUnit::getHeaderSize().
| void llvm::DWARFUnit::getInlinedChainForAddress | ( | uint64_t | Address, |
| SmallVectorImpl< DWARFDie > & | InlinedChain | ||
| ) |
getInlinedChainForAddress - fetches inlined chain for a given address.
Returns empty chain if there is no subprogram containing address. The chain is valid as long as parsed compile unit DIEs are not cleared.
Definition at line 358 of file DWARFUnit.cpp.
References llvm::SmallVectorImpl< T >::clear(), and llvm::DWARFDie::getInlinedChainForAddress().
Referenced by getFunctionNameForAddress(), and llvm::DWARFContext::getInliningInfoForAddress().
|
inline |
Definition at line 203 of file DWARFUnit.h.
Referenced by llvm::DWARFCompileUnit::dump(), llvm::DWARFTypeUnit::dump(), and llvm::DWARFTypeUnit::extractImpl().
|
inline |
Definition at line 168 of file DWARFUnit.h.
Referenced by llvm::DWARFContext::getLineTableForUnit().
|
inline |
Definition at line 292 of file DWARFUnit.h.
References llvm::DW_SECT_LINE, and llvm::DWARFUnitIndex::Entry::getOffset().
Referenced by llvm::DWARFContext::getLineTableForUnit().
|
inline |
Definition at line 202 of file DWARFUnit.h.
Referenced by llvm::DWARFCompileUnit::dump(), llvm::DWARFTypeUnit::dump(), llvm::DWARFDebugInfoEntry::extractFast(), and extractImpl().
|
inline |
Returns the number of DIEs in the unit.
Parses the unit if necessary.
Definition at line 251 of file DWARFUnit.h.
|
inline |
Definition at line 201 of file DWARFUnit.h.
Referenced by llvm::DWARFCompileUnit::dump(), and llvm::DWARFTypeUnit::dump().
| DWARFDie llvm::DWARFUnit::getParent | ( | const DWARFDebugInfoEntry * | Die | ) |
Definition at line 385 of file DWARFUnit.cpp.
References llvm::DWARFDebugInfoEntry::getDepth(), getUnitDIE(), and I.
Referenced by llvm::DWARFDie::getParent().
|
inline |
Definition at line 212 of file DWARFUnit.h.
References getDwarfOffsetByteSize().
|
inline |
Definition at line 191 of file DWARFUnit.h.
References llvm::DWARFSection::Relocs.
| DWARFDie llvm::DWARFUnit::getSibling | ( | const DWARFDebugInfoEntry * | Die | ) |
Definition at line 404 of file DWARFUnit.cpp.
References llvm::Depth, llvm::DWARFDebugInfoEntry::getAbbreviationDeclarationPtr(), llvm::DWARFDebugInfoEntry::getDepth(), and I.
Referenced by llvm::DWARFDie::getSibling().
|
inline |
Definition at line 187 of file DWARFUnit.h.
|
inline |
Definition at line 170 of file DWARFUnit.h.
Definition at line 75 of file DWARFUnit.cpp.
References llvm::DataExtractor::getU32(), and llvm::StringRef::size().
|
inline |
Definition at line 169 of file DWARFUnit.h.
Definition at line 228 of file DWARFUnit.h.
Referenced by collectAddressRanges(), llvm::DWARFCompileUnit::dump(), llvm::DWARFTypeUnit::dump(), getCompilationDir(), getDWOId(), llvm::DWARFContext::getLineTableForUnit(), and getParent().
|
inline |
getUnitSection - Return the DWARFUnitSection containing this unit.
Definition at line 247 of file DWARFUnit.h.
Referenced by llvm::DWARFDie::getAttributeValueAsReferencedDie().
|
inline |
Definition at line 204 of file DWARFUnit.h.
Referenced by llvm::DWARFCompileUnit::dump(), and llvm::DWARFTypeUnit::dump().
Definition at line 171 of file DWARFUnit.h.
|
inline |
Definition at line 224 of file DWARFUnit.h.
Definition at line 175 of file DWARFUnit.h.
1.8.6