class DWARFDebugAddrTable

Declaration

class DWARFDebugAddrTable { /* full declaration omitted */ };

Description

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.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h:26

Member Variables

private dwarf::DwarfFormat Format
private uint64_t Offset
private uint64_t Length = 0
The total length of the entries for this table, not including the length field itself.
private uint16_t Version
The DWARF version number.
private uint8_t AddrSize
The size in bytes of an address on the target architecture. For segmented addressing, this is the size of the offset portion of the address.
private uint8_t SegSize
The size in bytes of a segment selector on the target architecture. If the target system uses a flat address space, this value is 0.
private std::vector<uint64_t> Addrs

Method Overview

  • public void dump(llvm::raw_ostream & OS, llvm::DIDumpOptions DumpOpts = {}) const
  • public llvm::Error extract(const llvm::DWARFDataExtractor & Data, uint64_t * OffsetPtr, uint16_t CUVersion, uint8_t CUAddrSize, std::function<void (Error)> WarnCallback)
  • private llvm::Error extractAddresses(const llvm::DWARFDataExtractor & Data, uint64_t * OffsetPtr, uint64_t EndOffset)
  • public llvm::Error extractPreStandard(const llvm::DWARFDataExtractor & Data, uint64_t * OffsetPtr, uint16_t CUVersion, uint8_t CUAddrSize)
  • public llvm::Error extractV5(const llvm::DWARFDataExtractor & Data, uint64_t * OffsetPtr, uint8_t CUAddrSize, std::function<void (Error)> WarnCallback)
  • public Expected<uint64_t> getAddrEntry(uint32_t Index) const
  • public ArrayRef<uint64_t> getAddressEntries() const
  • public uint8_t getAddressSize() const
  • public dwarf::DwarfFormat getFormat() const
  • public Optional<uint64_t> getFullLength() const
  • public uint64_t getLength() const
  • public uint8_t getSegmentSelectorSize() const
  • public uint16_t getVersion() const
  • private void invalidateLength()

Methods

void dump(llvm::raw_ostream& OS,
          llvm::DIDumpOptions DumpOpts = {}) const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h:66

Parameters

llvm::raw_ostream& OS
llvm::DIDumpOptions DumpOpts = {}

llvm::Error extract(
    const llvm::DWARFDataExtractor& Data,
    uint64_t* OffsetPtr,
    uint16_t CUVersion,
    uint8_t CUAddrSize,
    std::function<void(Error)> WarnCallback)

Description

Extract the entire table, including all addresses.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h:52

Parameters

const llvm::DWARFDataExtractor& Data
uint64_t* OffsetPtr
uint16_t CUVersion
uint8_t CUAddrSize
std::function<void(Error)> WarnCallback

llvm::Error extractAddresses(
    const llvm::DWARFDataExtractor& Data,
    uint64_t* OffsetPtr,
    uint64_t EndOffset)

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h:46

Parameters

const llvm::DWARFDataExtractor& Data
uint64_t* OffsetPtr
uint64_t EndOffset

llvm::Error extractPreStandard(
    const llvm::DWARFDataExtractor& Data,
    uint64_t* OffsetPtr,
    uint16_t CUVersion,
    uint8_t CUAddrSize)

Description

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.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h:63

Parameters

const llvm::DWARFDataExtractor& Data
uint64_t* OffsetPtr
uint16_t CUVersion
uint8_t CUAddrSize

llvm::Error extractV5(
    const llvm::DWARFDataExtractor& Data,
    uint64_t* OffsetPtr,
    uint8_t CUAddrSize,
    std::function<void(Error)> WarnCallback)

Description

Extract a DWARFv5 address table.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h:57

Parameters

const llvm::DWARFDataExtractor& Data
uint64_t* OffsetPtr
uint8_t CUAddrSize
std::function<void(Error)> WarnCallback

Expected<uint64_t> getAddrEntry(
    uint32_t Index) const

Description

Return the address based on a given index.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h:69

Parameters

uint32_t Index

ArrayRef<uint64_t> getAddressEntries() const

Description

Return the parsed addresses of this table.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h:91

uint8_t getAddressSize() const

Description

Return the address size of this table.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h:85

dwarf::DwarfFormat getFormat() const

Description

Return the DWARF format of this table.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h:76

Optional<uint64_t> getFullLength() const

Description

Return the full length of this table, including the length field. Return None if the length cannot be identified reliably.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h:73

uint64_t getLength() const

Description

Return the length of this table.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h:79

uint8_t getSegmentSelectorSize() const

Description

Return the segment selector size of this table.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h:88

uint16_t getVersion() const

Description

Return the version of this table.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h:82

void invalidateLength()

Description

Invalidate Length field to stop further processing.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h:44