LLVM 20.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::dwarf::UnwindTable Class Reference

A class that contains all UnwindRow objects for an FDE or a single unwind row for a CIE. More...

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

Public Types

using RowContainer = std::vector< UnwindRow >
 
using iterator = RowContainer::iterator
 
using const_iterator = RowContainer::const_iterator
 

Public Member Functions

size_t size () const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
const UnwindRowoperator[] (size_t Index) const
 
void dump (raw_ostream &OS, DIDumpOptions DumpOpts, unsigned IndentLevel=0) const
 Dump the UnwindTable to the stream.
 

Static Public Member Functions

static Expected< UnwindTablecreate (const CIE *Cie)
 Create an UnwindTable from a Common Information Entry (CIE).
 
static Expected< UnwindTablecreate (const FDE *Fde)
 Create an UnwindTable from a Frame Descriptor Entry (FDE).
 

Detailed Description

A class that contains all UnwindRow objects for an FDE or a single unwind row for a CIE.

To unwind an address the rows, which are sorted by start address, can be searched to find the UnwindRow with the lowest starting address that is greater than or equal to the address that is being looked up.

Definition at line 321 of file DWARFDebugFrame.h.

Member Typedef Documentation

◆ const_iterator

using llvm::dwarf::UnwindTable::const_iterator = RowContainer::const_iterator

Definition at line 325 of file DWARFDebugFrame.h.

◆ iterator

using llvm::dwarf::UnwindTable::iterator = RowContainer::iterator

Definition at line 324 of file DWARFDebugFrame.h.

◆ RowContainer

Definition at line 323 of file DWARFDebugFrame.h.

Member Function Documentation

◆ begin() [1/2]

iterator llvm::dwarf::UnwindTable::begin ( )
inline

Definition at line 328 of file DWARFDebugFrame.h.

◆ begin() [2/2]

const_iterator llvm::dwarf::UnwindTable::begin ( ) const
inline

Definition at line 329 of file DWARFDebugFrame.h.

◆ create() [1/2]

Expected< UnwindTable > UnwindTable::create ( const CIE Cie)
static

Create an UnwindTable from a Common Information Entry (CIE).

Parameters
CieThe Common Information Entry to extract the table from. The CFIProgram is retrieved from the Cie object and used to create the UnwindTable.
Returns
An error if the DWARF Call Frame Information opcodes have state machine errors, or a valid UnwindTable otherwise.

Definition at line 234 of file DWARFDebugFrame.cpp.

References llvm::dwarf::FrameEntry::cfis(), llvm::dwarf::CFIProgram::empty(), and llvm::dwarf::UnwindLocation::Unspecified.

Referenced by llvm::dwarf::CIE::dump(), and llvm::dwarf::FDE::dump().

◆ create() [2/2]

Expected< UnwindTable > UnwindTable::create ( const FDE Fde)
static

Create an UnwindTable from a Frame Descriptor Entry (FDE).

Parameters
FdeThe Frame Descriptor Entry to extract the table from. The CFIProgram is retrieved from the Fde object and used to create the UnwindTable.
Returns
An error if the DWARF Call Frame Information opcodes have state machine errors, or a valid UnwindTable otherwise.

Definition at line 204 of file DWARFDebugFrame.cpp.

References llvm::dwarf::FrameEntry::cfis(), llvm::createStringError(), llvm::dwarf::CFIProgram::empty(), llvm::dwarf::FDE::getAddressRange(), llvm::dwarf::FDE::getInitialLocation(), llvm::dwarf::FDE::getLinkedCIE(), llvm::dwarf::FrameEntry::getOffset(), llvm::invalid_argument, and llvm::dwarf::UnwindLocation::Unspecified.

◆ dump()

void UnwindTable::dump ( raw_ostream OS,
DIDumpOptions  DumpOpts,
unsigned  IndentLevel = 0 
) const

Dump the UnwindTable to the stream.

Parameters
OSthe stream to use for output.
MRIregister information that helps emit register names insteead of raw register numbers.
IsEHtrue if the DWARF Call Frame Information is from .eh_frame instead of from .debug_frame. This is needed for register number conversion because some register numbers differ between the two sections for certain architectures like x86.
IndentLevelspecify the indent level as an integer. The UnwindRow will be output to the stream preceded by 2 * IndentLevel number of spaces.

Definition at line 192 of file DWARFDebugFrame.cpp.

References OS.

Referenced by llvm::dwarf::operator<<().

◆ end() [1/2]

iterator llvm::dwarf::UnwindTable::end ( )
inline

Definition at line 330 of file DWARFDebugFrame.h.

◆ end() [2/2]

const_iterator llvm::dwarf::UnwindTable::end ( ) const
inline

Definition at line 331 of file DWARFDebugFrame.h.

◆ operator[]()

const UnwindRow & llvm::dwarf::UnwindTable::operator[] ( size_t  Index) const
inline

Definition at line 332 of file DWARFDebugFrame.h.

References assert(), and size().

◆ size()

size_t llvm::dwarf::UnwindTable::size ( ) const
inline

Definition at line 327 of file DWARFDebugFrame.h.

Referenced by operator[]().


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