LLVM
15.0.0git
|
A class representing an address table as specified in DWARF v5. More...
#include "llvm/DebugInfo/DWARF/DWARFDebugAddr.h"
Public Member Functions | |
Error | extract (const DWARFDataExtractor &Data, uint64_t *OffsetPtr, uint16_t CUVersion, uint8_t CUAddrSize, std::function< void(Error)> WarnCallback) |
Extract the entire table, including all addresses. More... | |
Error | extractV5 (const DWARFDataExtractor &Data, uint64_t *OffsetPtr, uint8_t CUAddrSize, std::function< void(Error)> WarnCallback) |
Extract a DWARFv5 address table. More... | |
Error | extractPreStandard (const DWARFDataExtractor &Data, uint64_t *OffsetPtr, uint16_t CUVersion, uint8_t CUAddrSize) |
Extract a pre-DWARFv5 address table. More... | |
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... | |
Optional< uint64_t > | getFullLength () const |
Return the full length of this table, including the length field. More... | |
dwarf::DwarfFormat | getFormat () const |
Return the DWARF format of this table. More... | |
uint64_t | getLength () const |
Return the length of this table. More... | |
uint16_t | getVersion () const |
Return the version of this table. More... | |
uint8_t | getAddressSize () const |
Return the address size of this table. More... | |
uint8_t | getSegmentSelectorSize () const |
Return the segment selector size of this table. More... | |
ArrayRef< uint64_t > | getAddressEntries () const |
Return the parsed addresses of this table. 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 26 of file DWARFDebugAddr.h.
void DWARFDebugAddrTable::dump | ( | raw_ostream & | OS, |
DIDumpOptions | DumpOpts = {} |
||
) | const |
Definition at line 136 of file DWARFDebugAddr.cpp.
References Addr, llvm::format(), llvm::dwarf::FormatString(), llvm::dwarf::getDwarfOffsetByteSize(), llvm_unreachable, and llvm::DIDumpOptions::Verbose.
Error DWARFDebugAddrTable::extract | ( | const DWARFDataExtractor & | Data, |
uint64_t * | OffsetPtr, | ||
uint16_t | CUVersion, | ||
uint8_t | CUAddrSize, | ||
std::function< void(Error)> | WarnCallback | ||
) |
Extract the entire table, including all addresses.
Definition at line 122 of file DWARFDebugAddr.cpp.
References llvm::createStringError(), llvm::Data, extractPreStandard(), extractV5(), and llvm::invalid_argument.
Error DWARFDebugAddrTable::extractPreStandard | ( | const DWARFDataExtractor & | Data, |
uint64_t * | OffsetPtr, | ||
uint16_t | CUVersion, | ||
uint8_t | CUAddrSize | ||
) |
Extract a pre-DWARFv5 address table.
Such tables do not have a header and consist only of a series of addresses. See https://gcc.gnu.org/wiki/DebugFission for details.
Definition at line 107 of file DWARFDebugAddr.cpp.
References assert(), and llvm::Data.
Referenced by extract().
Error DWARFDebugAddrTable::extractV5 | ( | const DWARFDataExtractor & | Data, |
uint64_t * | OffsetPtr, | ||
uint8_t | CUAddrSize, | ||
std::function< void(Error)> | WarnCallback | ||
) |
Extract a DWARFv5 address table.
Definition at line 42 of file DWARFDebugAddr.cpp.
Referenced by extract().
Return the address based on a given index.
Definition at line 171 of file DWARFDebugAddr.cpp.
References llvm::createStringError(), and llvm::invalid_argument.
Return the parsed addresses of this table.
Definition at line 91 of file DWARFDebugAddr.h.
|
inline |
Return the address size of this table.
Definition at line 85 of file DWARFDebugAddr.h.
|
inline |
Return the DWARF format of this table.
Definition at line 76 of file DWARFDebugAddr.h.
Return the full length of this table, including the length field.
Return None if the length cannot be identified reliably.
Definition at line 180 of file DWARFDebugAddr.cpp.
References llvm::dwarf::getUnitLengthFieldByteSize(), and llvm::None.
|
inline |
Return the length of this table.
Definition at line 79 of file DWARFDebugAddr.h.
|
inline |
Return the segment selector size of this table.
Definition at line 88 of file DWARFDebugAddr.h.
|
inline |
Return the version of this table.
Definition at line 82 of file DWARFDebugAddr.h.