LLVM API Documentation
#include <DWARFUnit.h>
Public Member Functions | |
DWARFUnit (const DWARFDebugAbbrev *DA, StringRef IS, StringRef AS, StringRef RS, StringRef SS, StringRef SOS, StringRef AOS, const RelocAddrMap *M, bool LE) | |
virtual | ~DWARFUnit () |
StringRef | getStringSection () const |
StringRef | getStringOffsetSection () const |
void | setAddrOffsetSection (StringRef AOS, uint32_t Base) |
void | setRangesSection (StringRef RS, uint32_t Base) |
bool | getAddrOffsetSectionItem (uint32_t Index, uint64_t &Result) const |
bool | getStringOffsetSectionItem (uint32_t Index, uint32_t &Result) const |
DataExtractor | getDebugInfoExtractor () const |
DataExtractor | getStringExtractor () const |
const RelocAddrMap * | getRelocMap () const |
bool | extract (DataExtractor debug_info, uint32_t *offset_ptr) |
bool | extractRangeList (uint32_t RangeListOffset, DWARFDebugRangeList &RangeList) const |
void | clear () |
uint32_t | getOffset () const |
virtual uint32_t | getSize () const |
Size in bytes of the compile unit header. More... | |
uint32_t | getFirstDIEOffset () const |
uint32_t | getNextUnitOffset () const |
size_t | getDebugInfoSize () const |
Size in bytes of the .debug_info data associated with this compile unit. More... | |
uint32_t | getLength () const |
uint16_t | getVersion () const |
const DWARFAbbreviationDeclarationSet * | getAbbreviations () const |
uint8_t | getAddressByteSize () const |
uint64_t | getBaseAddress () const |
void | setBaseAddress (uint64_t base_addr) |
const DWARFDebugInfoEntryMinimal * | getCompileUnitDIE (bool extract_cu_die_only=true) |
const char * | getCompilationDir () |
uint64_t | getDWOId () |
void | buildAddressRangeTable (DWARFDebugAranges *debug_aranges, bool clear_dies_if_already_not_parsed, uint32_t CUOffsetInAranges) |
DWARFDebugInfoEntryInlinedChain | getInlinedChainForAddress (uint64_t Address) |
Protected Member Functions | |
virtual bool | extractImpl (DataExtractor debug_info, uint32_t *offset_ptr) |
Definition at line 30 of file DWARFUnit.h.
DWARFUnit::DWARFUnit | ( | const DWARFDebugAbbrev * | DA, |
StringRef | IS, | ||
StringRef | AS, | ||
StringRef | RS, | ||
StringRef | SS, | ||
StringRef | SOS, | ||
StringRef | AOS, | ||
const RelocAddrMap * | M, | ||
bool | LE | ||
) |
Definition at line 20 of file DWARFUnit.cpp.
References clear().
|
virtual |
Definition at line 29 of file DWARFUnit.cpp.
void DWARFUnit::buildAddressRangeTable | ( | DWARFDebugAranges * | debug_aranges, |
bool | clear_dies_if_already_not_parsed, | ||
uint32_t | CUOffsetInAranges | ||
) |
Definition at line 302 of file DWARFUnit.cpp.
References llvm::OwningPtr< T >::get(), and llvm::OwningPtr< T >::reset().
void DWARFUnit::clear | ( | ) |
Definition at line 97 of file DWARFUnit.cpp.
References llvm::OwningPtr< T >::reset().
Referenced by DWARFUnit(), and extract().
bool DWARFUnit::extract | ( | DataExtractor | debug_info, |
uint32_t * | offset_ptr | ||
) |
Definition at line 72 of file DWARFUnit.cpp.
References clear(), extractImpl(), and llvm::DataExtractor::isValidOffset().
|
protectedvirtual |
Reimplemented in llvm::DWARFTypeUnit.
Definition at line 54 of file DWARFUnit.cpp.
References llvm::DWARFDebugAbbrev::getAbbreviationDeclarationSet(), getNextUnitOffset(), llvm::DataExtractor::getU16(), llvm::DataExtractor::getU32(), llvm::DataExtractor::getU8(), llvm::DWARFContext::isSupportedVersion(), llvm::DataExtractor::isValidOffset(), and llvm::StringRef::size().
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 88 of file DWARFUnit.cpp.
References llvm::DWARFDebugRangeList::extract().
Referenced by llvm::DWARFDebugInfoEntryMinimal::addressRangeContainsAddress().
|
inline |
Definition at line 114 of file DWARFUnit.h.
Referenced by llvm::DWARFCompileUnit::dump(), llvm::DWARFTypeUnit::dump(), and llvm::DWARFDebugInfoEntryMinimal::extractFast().
|
inline |
Definition at line 117 of file DWARFUnit.h.
Referenced by llvm::DWARFCompileUnit::dump(), llvm::DWARFTypeUnit::dump(), llvm::DWARFContext::dump(), llvm::DWARFDebugInfoEntryMinimal::extractFast(), llvm::DWARFFormValue::extractValue(), llvm::DWARFContext::getLineTableForCompileUnit(), and llvm::DWARFFormValue::skipValue().
bool DWARFUnit::getAddrOffsetSectionItem | ( | uint32_t | Index, |
uint64_t & | Result | ||
) | const |
Definition at line 32 of file DWARFUnit.cpp.
References llvm::X86II::DA, llvm::DataExtractor::getAddress(), and llvm::StringRef::size().
Referenced by llvm::DWARFFormValue::dump(), and llvm::DWARFFormValue::getAsAddress().
|
inline |
Definition at line 118 of file DWARFUnit.h.
Referenced by llvm::DWARFDebugInfoEntryMinimal::addressRangeContainsAddress().
const char * DWARFUnit::getCompilationDir | ( | ) |
Definition at line 110 of file DWARFUnit.cpp.
Referenced by getFileNameForCompileUnit().
|
inline |
Definition at line 125 of file DWARFUnit.h.
Referenced by llvm::DWARFCompileUnit::dump(), llvm::DWARFTypeUnit::dump(), llvm::DWARFContext::dump(), and llvm::DWARFContext::getLineTableForCompileUnit().
|
inline |
Definition at line 88 of file DWARFUnit.h.
Referenced by llvm::DWARFDebugInfoEntryMinimal::dump(), llvm::DWARFDebugInfoEntryMinimal::dumpAttribute(), llvm::DWARFDebugInfoEntryMinimal::extractFast(), and llvm::DWARFDebugInfoEntryMinimal::getAttributeValue().
|
inline |
Size in bytes of the .debug_info data associated with this compile unit.
Definition at line 111 of file DWARFUnit.h.
References getSize().
uint64_t DWARFUnit::getDWOId | ( | ) |
Definition at line 117 of file DWARFUnit.cpp.
|
inline |
Definition at line 108 of file DWARFUnit.h.
References getSize().
DWARFDebugInfoEntryInlinedChain DWARFUnit::getInlinedChainForAddress | ( | uint64_t | Address | ) |
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 343 of file DWARFUnit.cpp.
References llvm::OwningPtr< T >::get(), and llvm::DWARFDebugInfoEntryMinimal::getInlinedChainForAddress().
Referenced by llvm::DWARFContext::getInliningInfoForAddress(), llvm::DWARFContext::getLineInfoForAddress(), and llvm::DWARFContext::getLineInfoForAddressRange().
|
inline |
Definition at line 112 of file DWARFUnit.h.
Referenced by llvm::DWARFCompileUnit::dump(), llvm::DWARFTypeUnit::dump(), and llvm::DWARFTypeUnit::extractImpl().
|
inline |
Definition at line 109 of file DWARFUnit.h.
Referenced by llvm::DWARFCompileUnit::dump(), llvm::DWARFTypeUnit::dump(), llvm::DWARFDebugInfoEntryMinimal::extractFast(), and extractImpl().
|
inline |
Definition at line 105 of file DWARFUnit.h.
Referenced by llvm::DWARFCompileUnit::dump(), llvm::DWARFTypeUnit::dump(), llvm::DWARFFormValue::dump(), and llvm::DWARFFormValue::getAsReference().
|
inline |
Definition at line 95 of file DWARFUnit.h.
Referenced by llvm::DWARFFormValue::extractValue().
|
inlinevirtual |
Size in bytes of the compile unit header.
Reimplemented in llvm::DWARFTypeUnit.
Definition at line 107 of file DWARFUnit.h.
Referenced by getDebugInfoSize(), getFirstDIEOffset(), and llvm::DWARFTypeUnit::getSize().
|
inline |
Definition at line 91 of file DWARFUnit.h.
Referenced by llvm::DWARFFormValue::getAsCString().
|
inline |
Definition at line 74 of file DWARFUnit.h.
Referenced by llvm::DWARFFormValue::dump().
bool DWARFUnit::getStringOffsetSectionItem | ( | uint32_t | Index, |
uint32_t & | Result | ||
) | const |
Definition at line 42 of file DWARFUnit.cpp.
References llvm::X86II::DA, llvm::DataExtractor::getU32(), and llvm::StringRef::size().
Referenced by llvm::DWARFFormValue::getAsCString().
|
inline |
Definition at line 73 of file DWARFUnit.h.
Referenced by llvm::DWARFFormValue::dump().
|
inline |
Definition at line 113 of file DWARFUnit.h.
Referenced by llvm::DWARFCompileUnit::dump(), llvm::DWARFTypeUnit::dump(), llvm::DWARFDebugInfoEntryMinimal::extractFast(), llvm::DWARFFormValue::extractValue(), and llvm::DWARFFormValue::skipValue().
|
inline |
Definition at line 75 of file DWARFUnit.h.
|
inline |
Definition at line 120 of file DWARFUnit.h.
|
inline |
Definition at line 79 of file DWARFUnit.h.