LLVM 22.0.0git
|
Base class describing the header of any kind of "unit." Some information is specific to certain unit types. More...
#include "llvm/DebugInfo/DWARF/DWARFUnit.h"
Public Member Functions | |
LLVM_ABI Error | extract (DWARFContext &Context, const DWARFDataExtractor &debug_info, uint64_t *offset_ptr, DWARFSectionKind SectionKind) |
Parse a unit header from debug_info starting at offset_ptr . | |
LLVM_ABI Error | applyIndexEntry (const DWARFUnitIndex::Entry *Entry) |
uint64_t | getOffset () const |
const dwarf::FormParams & | getFormParams () const |
uint16_t | getVersion () const |
dwarf::DwarfFormat | getFormat () const |
uint8_t | getAddressByteSize () const |
uint8_t | getRefAddrByteSize () const |
uint8_t | getDwarfOffsetByteSize () const |
uint64_t | getLength () const |
uint64_t | getAbbrOffset () const |
std::optional< uint64_t > | getDWOId () const |
void | setDWOId (uint64_t Id) |
const DWARFUnitIndex::Entry * | getIndexEntry () const |
uint64_t | getTypeHash () const |
uint64_t | getTypeOffset () const |
uint8_t | getUnitType () const |
bool | isTypeUnit () const |
uint8_t | getSize () const |
uint8_t | getUnitLengthFieldByteSize () const |
uint64_t | getNextUnitOffset () const |
Base class describing the header of any kind of "unit." Some information is specific to certain unit types.
We separate this class out so we can parse the header before deciding what specific kind of unit to construct.
Definition at line 56 of file DWARFUnit.h.
Error DWARFUnitHeader::applyIndexEntry | ( | const DWARFUnitIndex::Entry * | Entry | ) |
Definition at line 341 of file DWARFUnit.cpp.
References assert(), llvm::createStringError(), getLength(), getUnitLengthFieldByteSize(), llvm::invalid_argument, and llvm::Error::success().
Error DWARFUnitHeader::extract | ( | DWARFContext & | Context, |
const DWARFDataExtractor & | debug_info, | ||
uint64_t * | offset_ptr, | ||
DWARFSectionKind | SectionKind ) |
Parse a unit header from debug_info
starting at offset_ptr
.
Note that SectionKind
is used as a hint to guess the unit type for DWARF formats prior to DWARFv5. In DWARFv5 the unit type is explicitly defined in the header and the hint is ignored.
Definition at line 254 of file DWARFUnit.cpp.
References assert(), llvm::DWARFContext::checkAddressSizeSupported(), llvm::createStringError(), llvm::DW_SECT_EXT_TYPES, getAddressByteSize(), llvm::DWARFDataExtractorBase< Relocator >::getInitialLength(), getLength(), llvm::DWARFContext::getMaxSupportedVersion(), getNextUnitOffset(), llvm::DWARFDataExtractorBase< Relocator >::getRelocatedValue(), llvm::DataExtractor::getU16(), llvm::DataExtractor::getU64(), llvm::DataExtractor::getU8(), getUnitLengthFieldByteSize(), llvm::DataExtractor::getUnsigned(), getVersion(), llvm::invalid_argument, llvm::DWARFContext::isSupportedVersion(), isTypeUnit(), llvm::DataExtractor::isValidOffset(), llvm::joinErrors(), llvm::DataExtractor::size(), and llvm::Error::success().
|
inline |
Definition at line 101 of file DWARFUnit.h.
|
inline |
Definition at line 95 of file DWARFUnit.h.
Referenced by extract().
|
inline |
Definition at line 97 of file DWARFUnit.h.
|
inline |
Definition at line 102 of file DWARFUnit.h.
|
inline |
Definition at line 94 of file DWARFUnit.h.
|
inline |
Definition at line 92 of file DWARFUnit.h.
|
inline |
Definition at line 107 of file DWARFUnit.h.
|
inline |
Definition at line 100 of file DWARFUnit.h.
Referenced by applyIndexEntry(), and extract().
|
inline |
Definition at line 118 of file DWARFUnit.h.
References getUnitLengthFieldByteSize().
Referenced by extract().
|
inline |
Definition at line 91 of file DWARFUnit.h.
|
inline |
Definition at line 96 of file DWARFUnit.h.
|
inline |
Definition at line 114 of file DWARFUnit.h.
|
inline |
Definition at line 108 of file DWARFUnit.h.
Referenced by llvm::DWARFTypeUnit::getTypeHash().
|
inline |
Definition at line 109 of file DWARFUnit.h.
Referenced by llvm::DWARFTypeUnit::getTypeOffset().
|
inline |
Definition at line 115 of file DWARFUnit.h.
References llvm::dwarf::getUnitLengthFieldByteSize().
Referenced by applyIndexEntry(), extract(), and getNextUnitOffset().
|
inline |
Definition at line 110 of file DWARFUnit.h.
|
inline |
Definition at line 93 of file DWARFUnit.h.
Referenced by extract().
|
inline |
Definition at line 111 of file DWARFUnit.h.
Referenced by extract().
|
inline |
Definition at line 103 of file DWARFUnit.h.
References assert().