LLVM  8.0.1
Classes | Public Member Functions | List of all members
llvm::DWARFDebugAddrTable Class Reference

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...
 

Detailed 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.

Definition at line 30 of file DWARFDebugAddr.h.

Member Function Documentation

◆ clear()

void DWARFDebugAddrTable::clear ( )

Definition at line 16 of file DWARFDebugAddr.cpp.

References invalidateLength().

Referenced by extract().

◆ dump()

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

◆ extract()

Error DWARFDebugAddrTable::extract ( DWARFDataExtractor  Data,
uint32_t OffsetPtr,
uint16_t  Version,
uint8_t  AddrSize,
std::function< void(Error)>  WarnCallback 
)

◆ getAddrEntry()

Expected< uint64_t > DWARFDebugAddrTable::getAddrEntry ( uint32_t  Index) const

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().

◆ getAddrSize()

uint8_t llvm::DWARFDebugAddrTable::getAddrSize ( ) const
inline

◆ getDataSize()

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().

◆ getHeaderOffset()

uint32_t llvm::DWARFDebugAddrTable::getHeaderOffset ( ) const
inline

Definition at line 62 of file DWARFDebugAddr.h.

◆ getHeaderSize()

uint8_t llvm::DWARFDebugAddrTable::getHeaderSize ( ) const
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().

◆ getLength()

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().

◆ hasValidLength()

bool llvm::DWARFDebugAddrTable::hasValidLength ( ) const
inline

Verify that the given length is valid for this table.

Definition at line 87 of file DWARFDebugAddr.h.

References getLength().

◆ invalidateLength()

void llvm::DWARFDebugAddrTable::invalidateLength ( )
inline

Invalidate Length field to stop further processing.

Definition at line 90 of file DWARFDebugAddr.h.

References getDataSize(), and llvm::DWARFDebugAddrTable::Header::Length.

Referenced by clear(), and extract().


The documentation for this class was generated from the following files: