Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
llvm::DWARFListTableBase< DWARFListType > Class Template Reference

A class representing a table of lists as specified in the DWARF v5 standard for location lists and range lists. More...

#include "llvm/DebugInfo/DWARF/DWARFListTable.h"

Inheritance diagram for llvm::DWARFListTableBase< DWARFListType >:
[legend]

Public Member Functions

void clear ()
Error extractHeaderAndOffsets (DWARFDataExtractor Data, uint64_t *OffsetPtr)
 Extract the table header and the array of offsets.
Error extract (DWARFDataExtractor Data, uint64_t *OffsetPtr)
 Extract an entire table, including all list entries.
Expected< DWARFListTypefindList (DWARFDataExtractor Data, uint64_t Offset) const
 Look up a list based on a given offset.
uint64_t getHeaderOffset () const
uint8_t getAddrSize () const
uint32_t getOffsetEntryCount () const
dwarf::DwarfFormat getFormat () const
void dump (DWARFDataExtractor Data, raw_ostream &OS, llvm::function_ref< std::optional< object::SectionedAddress >(uint32_t)> LookupPooledAddress, DIDumpOptions DumpOpts={}) const
std::optional< uint64_tgetOffsetEntry (DataExtractor Data, uint32_t Index) const
 Return the contents of the offset entry designated by a given index.
uint8_t getHeaderSize () const
 Return the size of the table header including the length but not including the offsets.
uint64_t length ()

Protected Member Functions

 DWARFListTableBase (StringRef SectionName, StringRef HeaderString, StringRef ListTypeString)

Detailed Description

template<typename DWARFListType>
class llvm::DWARFListTableBase< DWARFListType >

A class representing a table of lists as specified in the DWARF v5 standard for location lists and range lists.

The table consists of a header followed by an array of offsets into a DWARF section, followed by zero or more list entries. The list entries are kept in a map where the keys are the lists' section offsets.

Definition at line 148 of file DWARFListTable.h.

Constructor & Destructor Documentation

◆ DWARFListTableBase()

template<typename DWARFListType>
llvm::DWARFListTableBase< DWARFListType >::DWARFListTableBase ( StringRef SectionName,
StringRef HeaderString,
StringRef ListTypeString )
inlineprotected

Definition at line 158 of file DWARFListTable.h.

Member Function Documentation

◆ clear()

template<typename DWARFListType>
void llvm::DWARFListTableBase< DWARFListType >::clear ( )
inline

Definition at line 163 of file DWARFListTable.h.

Referenced by extract().

◆ dump()

template<typename DWARFListType>
void llvm::DWARFListTableBase< DWARFListType >::dump ( DWARFDataExtractor Data,
raw_ostream & OS,
llvm::function_ref< std::optional< object::SectionedAddress >(uint32_t)> LookupPooledAddress,
DIDumpOptions DumpOpts = {} ) const

◆ extract()

template<typename DWARFListType>
Error llvm::DWARFListTableBase< DWARFListType >::extract ( DWARFDataExtractor Data,
uint64_t * OffsetPtr )

Extract an entire table, including all list entries.

Definition at line 205 of file DWARFListTable.h.

References assert(), clear(), llvm::Data, E(), llvm::DWARFListType< ListEntryType >::extract(), extractHeaderAndOffsets(), getHeaderOffset(), and llvm::Error::success().

Referenced by dumpRnglistsSection().

◆ extractHeaderAndOffsets()

template<typename DWARFListType>
Error llvm::DWARFListTableBase< DWARFListType >::extractHeaderAndOffsets ( DWARFDataExtractor Data,
uint64_t * OffsetPtr )
inline

Extract the table header and the array of offsets.

Definition at line 168 of file DWARFListTable.h.

References llvm::Data.

Referenced by extract().

◆ findList()

template<typename DWARFListType>
Expected< DWARFListType > llvm::DWARFListTableBase< DWARFListType >::findList ( DWARFDataExtractor Data,
uint64_t Offset ) const

Look up a list based on a given offset.

Extract it and enter it into the list map if necessary.

Definition at line 283 of file DWARFListTable.h.

References llvm::Data, E(), getHeaderOffset(), llvm::List, and llvm::Offset.

Referenced by llvm::DWARFUnit::findRnglistFromOffset().

◆ getAddrSize()

template<typename DWARFListType>
uint8_t llvm::DWARFListTableBase< DWARFListType >::getAddrSize ( ) const
inline

Definition at line 179 of file DWARFListTable.h.

Referenced by dump().

◆ getFormat()

template<typename DWARFListType>
dwarf::DwarfFormat llvm::DWARFListTableBase< DWARFListType >::getFormat ( ) const
inline

Definition at line 181 of file DWARFListTable.h.

Referenced by getHeaderSize().

◆ getHeaderOffset()

template<typename DWARFListType>
uint64_t llvm::DWARFListTableBase< DWARFListType >::getHeaderOffset ( ) const
inline

Definition at line 178 of file DWARFListTable.h.

Referenced by extract(), and findList().

◆ getHeaderSize()

template<typename DWARFListType>
uint8_t llvm::DWARFListTableBase< DWARFListType >::getHeaderSize ( ) const
inline

Return the size of the table header including the length but not including the offsets.

This is dependent on the table format, which is unambiguously derived from parsing the table.

Definition at line 197 of file DWARFListTable.h.

References getFormat(), and llvm::DWARFListTableHeader::getHeaderSize().

◆ getOffsetEntry()

template<typename DWARFListType>
std::optional< uint64_t > llvm::DWARFListTableBase< DWARFListType >::getOffsetEntry ( DataExtractor Data,
uint32_t Index ) const
inline

Return the contents of the offset entry designated by a given index.

Definition at line 190 of file DWARFListTable.h.

References llvm::Data.

◆ getOffsetEntryCount()

template<typename DWARFListType>
uint32_t llvm::DWARFListTableBase< DWARFListType >::getOffsetEntryCount ( ) const
inline

Definition at line 180 of file DWARFListTable.h.

◆ length()

template<typename DWARFListType>
uint64_t llvm::DWARFListTableBase< DWARFListType >::length ( )
inline

Definition at line 201 of file DWARFListTable.h.

Referenced by dumpRnglistsSection().


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