LLVM
8.0.1
|
A class representing an address table as specified in DWARF v5. More...
#include "llvm/DebugInfo/DWARF/DWARFDebugAddr.h"
Classes | |
struct | Header |
Public Member Functions | |
void | clear () |
Error | extract (DWARFDataExtractor Data, uint32_t *OffsetPtr, uint16_t Version, uint8_t AddrSize, std::function< void(Error)> WarnCallback) |
Extract an entire table, including all addresses. More... | |
uint32_t | getHeaderOffset () const |
uint8_t | getAddrSize () const |
void | dump (raw_ostream &OS, DIDumpOptions DumpOpts={}) const |
Expected< uint64_t > | getAddrEntry (uint32_t Index) const |
Return the address based on a given index. More... | |
uint8_t | getHeaderSize () const |
Return the size of the table header including the length but not including the addresses. More... | |
uint32_t | getLength () const |
Returns the length of this table, including the length field, or 0 if the length has not been determined (e.g. More... | |
bool | hasValidLength () const |
Verify that the given length is valid for this table. More... | |
void | invalidateLength () |
Invalidate Length field to stop further processing. More... | |
uint32_t | getDataSize () const |
Returns the length of the array of addresses. More... | |
A class representing an address table as specified in DWARF v5.
The table consists of a header followed by an array of address values from .debug_addr section.
Definition at line 30 of file DWARFDebugAddr.h.
void DWARFDebugAddrTable::clear | ( | ) |
Definition at line 16 of file DWARFDebugAddr.cpp.
References invalidateLength().
Referenced by extract().
void DWARFDebugAddrTable::dump | ( | raw_ostream & | OS, |
DIDumpOptions | DumpOpts = {} |
||
) | const |
Definition at line 142 of file DWARFDebugAddr.cpp.
References llvm::DWARFDebugAddrTable::Header::AddrSize, llvm::format(), llvm::DWARFDebugAddrTable::Header::Length, llvm::DWARFDebugAddrTable::Header::SegSize, llvm::DIDumpOptions::Verbose, and llvm::DWARFDebugAddrTable::Header::Version.
Referenced by getAddrSize().
Error DWARFDebugAddrTable::extract | ( | DWARFDataExtractor | Data, |
uint32_t * | OffsetPtr, | ||
uint16_t | Version, | ||
uint8_t | AddrSize, | ||
std::function< void(Error)> | WarnCallback | ||
) |
Extract an entire table, including all addresses.
Definition at line 22 of file DWARFDebugAddr.cpp.
References clear(), llvm::createStringError(), llvm::dwarf::DWARF32, getLength(), llvm::DataExtractor::getU32(), llvm::invalid_argument, invalidateLength(), llvm::DataExtractor::isValidOffsetForDataOfSize(), llvm::DWARFDebugAddrTable::Header::Length, llvm::not_supported, and llvm::IndexedInstrProf::Version.
Return the address based on a given index.
Definition at line 176 of file DWARFDebugAddr.cpp.
References llvm::createStringError(), and llvm::invalid_argument.
Referenced by getAddrSize().
|
inline |
Definition at line 63 of file DWARFDebugAddr.h.
References llvm::DWARFDebugAddrTable::Header::AddrSize, dump(), and getAddrEntry().
uint32_t DWARFDebugAddrTable::getDataSize | ( | ) | const |
Returns the length of the array of addresses.
Definition at line 192 of file DWARFDebugAddr.cpp.
References getHeaderSize(), and getLength().
Referenced by invalidateLength().
|
inline |
Definition at line 62 of file DWARFDebugAddr.h.
|
inline |
Return the size of the table header including the length but not including the addresses.
Definition at line 71 of file DWARFDebugAddr.h.
References llvm::dwarf::DWARF32, llvm::dwarf::DWARF64, getLength(), and llvm_unreachable.
Referenced by getDataSize().
uint32_t DWARFDebugAddrTable::getLength | ( | ) | const |
Returns the length of this table, including the length field, or 0 if the length has not been determined (e.g.
because the table has not yet been parsed, or there was a problem in parsing).
Definition at line 185 of file DWARFDebugAddr.cpp.
References llvm::DWARFDebugAddrTable::Header::Length.
Referenced by extract(), getDataSize(), getHeaderSize(), and hasValidLength().
|
inline |
Verify that the given length is valid for this table.
Definition at line 87 of file DWARFDebugAddr.h.
References getLength().
|
inline |
Invalidate Length field to stop further processing.
Definition at line 90 of file DWARFDebugAddr.h.
References getDataSize(), and llvm::DWARFDebugAddrTable::Header::Length.