|
LLVM
5.0.0
|
#include "llvm/DebugInfo/DWARF/DWARFUnit.h"
Static Public Member Functions | |
| static bool | isValidUnitType (uint8_t UnitType) |
| 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 | |
| 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 113 of file DWARFUnit.h.
| DWARFUnit::DWARFUnit | ( | DWARFContext & | Context, |
| const DWARFSection & | Section, | ||
| const DWARFDebugAbbrev * | DA, | ||
| const DWARFSection * | RS, | ||
| StringRef | SS, | ||
| const DWARFSection & | SOS, | ||
| const DWARFSection * | AOS, | ||
| const DWARFSection & | LS, | ||
| bool | LE, | ||
| bool | IsDWO, | ||
| const DWARFUnitSectionBase & | UnitSection, | ||
| const DWARFUnitIndex::Entry * | IndexEntry = nullptr |
||
| ) |
Definition at line 47 of file DWARFUnit.cpp.
References clear().
|
virtualdefault |
| void DWARFUnit::clear | ( | ) |
Definition at line 150 of file DWARFUnit.cpp.
References llvm::dwarf::DWARF32.
Referenced by DWARFUnit(), and extract().
| void DWARFUnit::collectAddressRanges | ( | DWARFAddressRangesVector & | CURanges | ) |
Definition at line 313 of file DWARFUnit.cpp.
References llvm::DWARFDie::collectChildrenAddressRanges(), llvm::DWARFDie::getAddressRanges(), and getUnitDIE().
|
inline |
Definition at line 346 of file DWARFUnit.h.
| bool DWARFUnit::extract | ( | DataExtractor | debug_info, |
| uint32_t * | offset_ptr | ||
| ) |
Definition at line 124 of file DWARFUnit.cpp.
References clear(), extractImpl(), and llvm::DataExtractor::isValidOffset().
|
protectedvirtual |
Reimplemented in llvm::DWARFTypeUnit.
Definition at line 84 of file DWARFUnit.cpp.
References llvm::DWARFFormParams::AddrSize, llvm::DW_SECT_ABBREV, llvm::dwarf::DWARF32, llvm::DWARFFormParams::Format, llvm::DWARFDebugAbbrev::getAbbreviationDeclarationSet(), getAddressByteSize(), getNextUnitOffset(), llvm::DWARFUnitIndex::Entry::getOffset(), llvm::DataExtractor::getU16(), llvm::DataExtractor::getU32(), llvm::DataExtractor::getU8(), getVersion(), llvm::DWARFContext::isSupportedVersion(), llvm::DataExtractor::isValidOffset(), llvm::DWARFUnitIndex::Entry::SectionContribution::Offset, llvm::DWARFContext::setMaxVersionIfGreater(), and llvm::DWARFFormParams::Version.
Referenced by extract(), and llvm::DWARFTypeUnit::extractImpl().
| bool 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 140 of file DWARFUnit.cpp.
References assert(), llvm::DWARFDebugRangeList::extract(), and getAddressByteSize().
|
inline |
Definition at line 235 of file DWARFUnit.h.
Referenced by llvm::DWARFCompileUnit::dump(), llvm::DWARFTypeUnit::dump(), and llvm::DWARFDebugInfoEntry::extractFast().
|
inline |
Definition at line 229 of file DWARFUnit.h.
References llvm::DWARFFormParams::AddrSize.
Referenced by llvm::DWARFCompileUnit::dump(), llvm::DWARFTypeUnit::dump(), dumpAttribute(), extractImpl(), extractRangeList(), getAddrOffsetSectionItem(), getDebugInfoExtractor(), and llvm::DWARFContext::getLineTableForUnit().
Definition at line 62 of file DWARFUnit.cpp.
References llvm::DWARFSection::Data, getAddressByteSize(), llvm::DWARFDataExtractor::getRelocatedAddress(), and llvm::StringRef::size().
|
inline |
Definition at line 269 of file DWARFUnit.h.
Definition at line 162 of file DWARFUnit.cpp.
References llvm::find(), getUnitDIE(), and llvm::dwarf::toString().
Referenced by dumpAttribute(), llvm::DWARFContext::getInliningInfoForAddress(), llvm::DWARFContext::getLineInfoForAddress(), and llvm::DWARFContext::getLineInfoForAddressRange().
|
inline |
Definition at line 176 of file DWARFUnit.h.
Referenced by dumpAttribute().
|
inline |
Definition at line 200 of file DWARFUnit.h.
References getAddressByteSize().
Referenced by dumpAttribute(), llvm::DWARFDebugInfoEntry::extractFast(), and llvm::DWARFAbbreviationDeclaration::getAttributeValue().
Return the DIE object at the given index.
Definition at line 314 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 326 of file DWARFUnit.h.
References assert().
Referenced by llvm::DWARFTypeUnit::dump().
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 309 of file DWARFUnit.h.
References llvm::DWARFDie::getDebugInfoEntry().
|
inlinestatic |
Return the number of bytes for the header of a unit of UnitType type.
This function must be called with a valid unit type which in DWARF5 is defined as one of the following six types.
Definition at line 254 of file DWARFUnit.h.
References llvm_unreachable().
|
inline |
Definition at line 231 of file DWARFUnit.h.
References llvm::DWARFFormParams::getDwarfOffsetByteSize().
Referenced by getStringOffsetSectionItem().
| Optional< uint64_t > DWARFUnit::getDWOId | ( | ) |
Definition at line 166 of file DWARFUnit.cpp.
References llvm::find(), getUnitDIE(), and llvm::dwarf::toUnsigned().
|
inline |
Definition at line 228 of file DWARFUnit.h.
References llvm::DWARFFormParams::Format.
|
inline |
Definition at line 226 of file DWARFUnit.h.
Referenced by llvm::DWARFDebugInfoEntry::extractFast(), llvm::DWARFAbbreviationDeclaration::getAttributeValue(), and llvm::DWARFAbbreviationDeclaration::AttributeSpec::getByteSize().
|
inlineprotectedvirtual |
Size in bytes of the unit header.
Reimplemented in llvm::DWARFTypeUnit.
Definition at line 164 of file DWARFUnit.h.
References getVersion().
Referenced by llvm::DWARFTypeUnit::getHeaderSize().
| void 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 388 of file DWARFUnit.cpp.
References assert(), llvm::SmallVectorBase::empty(), llvm::DWARFDie::getParent(), llvm::DWARFDie::isSubroutineDIE(), and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
Referenced by getFunctionNameAndStartLineForAddress(), and llvm::DWARFContext::getInliningInfoForAddress().
|
inline |
Definition at line 224 of file DWARFUnit.h.
Referenced by llvm::DWARFCompileUnit::dump(), llvm::DWARFTypeUnit::dump(), and llvm::DWARFTypeUnit::extractImpl().
|
inline |
Definition at line 178 of file DWARFUnit.h.
Referenced by llvm::DWARFContext::getLineTableForUnit().
|
inline |
Definition at line 339 of file DWARFUnit.h.
References llvm::DW_SECT_LINE, and llvm::DWARFUnitIndex::Entry::getOffset().
Referenced by llvm::DWARFContext::getLineTableForUnit().
|
inline |
Definition at line 223 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 298 of file DWARFUnit.h.
|
inline |
Definition at line 222 of file DWARFUnit.h.
Referenced by llvm::DWARFCompileUnit::dump(), and llvm::DWARFTypeUnit::dump().
| DWARFDie DWARFUnit::getParent | ( | const DWARFDebugInfoEntry * | Die | ) |
Definition at line 413 of file DWARFUnit.cpp.
References llvm::DWARFDebugInfoEntry::getDepth(), getUnitDIE(), and I.
|
inline |
Definition at line 230 of file DWARFUnit.h.
References llvm::DWARFFormParams::getRefAddrByteSize().
|
inline |
Definition at line 209 of file DWARFUnit.h.
References llvm::DWARFSection::Relocs.
| DWARFDie DWARFUnit::getSibling | ( | const DWARFDebugInfoEntry * | Die | ) |
Definition at line 432 of file DWARFUnit.cpp.
References llvm::Depth, llvm::DWARFDebugInfoEntry::getAbbreviationDeclarationPtr(), llvm::DWARFDebugInfoEntry::getDepth(), and I.
|
inline |
Definition at line 205 of file DWARFUnit.h.
|
inline |
Definition at line 180 of file DWARFUnit.h.
Definition at line 73 of file DWARFUnit.cpp.
References llvm::DWARFSection::Data, getDwarfOffsetByteSize(), llvm::DWARFDataExtractor::getRelocatedValue(), and llvm::StringRef::size().
|
inline |
Definition at line 210 of file DWARFUnit.h.
References llvm::DWARFSection::Relocs.
|
inline |
Definition at line 179 of file DWARFUnit.h.
Definition at line 275 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 294 of file DWARFUnit.h.
|
inline |
Definition at line 239 of file DWARFUnit.h.
Referenced by llvm::DWARFCompileUnit::dump(), and llvm::DWARFTypeUnit::dump().
|
inline |
Definition at line 227 of file DWARFUnit.h.
References llvm::DWARFFormParams::Version.
Referenced by llvm::DWARFCompileUnit::dump(), llvm::DWARFTypeUnit::dump(), extractImpl(), and getHeaderSize().
|
inlinestatic |
Definition at line 241 of file DWARFUnit.h.
|
inline |
Definition at line 184 of file DWARFUnit.h.
|
inline |
Definition at line 271 of file DWARFUnit.h.
|
inline |
Definition at line 192 of file DWARFUnit.h.
| void DWARFUnit::updateAddressDieMap | ( | DWARFDie | Die | ) |
Recursively update address to Die map.
Definition at line 346 of file DWARFUnit.cpp.
References B, llvm::DWARFDie::getAddressRanges(), llvm::DWARFDie::getFirstChild(), llvm::DWARFDie::getSibling(), llvm::DWARFDie::isSubroutineDIE(), and second.
1.8.6