LLVM 24.0.0git
llvm::DWARFDebugFrame Class Reference

A parsed .debug_frame or .eh_frame section. More...

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

Public Member Functions

LLVM_ABI DWARFDebugFrame (Triple::ArchType Arch, bool IsEH=false, uint64_t EHFrameAddress=0)
LLVM_ABI ~DWARFDebugFrame ()
LLVM_ABI void dump (raw_ostream &OS, DIDumpOptions DumpOpts, std::optional< uint64_t > Offset) const
 Dump the section data into the given stream.
LLVM_ABI Error parse (DWARFDataExtractor Data, bool ParseCFIProgram=true)
 Parse the section from raw data.
LLVM_ABI Error parseCFIProgram (dwarf::FrameEntry &Entry) const
 Decode the CFI instruction program of Entry if parse() was told to skip it.
LLVM_ABI Error parseAllCFIPrograms () const
 Decode all the CFI instruction programs that parse() was told to skip.
bool empty () const
 Return whether the section has any entries.
iterator begin () const
 DWARF Frame entries accessors.
iterator end () const
iterator_range< iteratorentries () const
uint64_t getEHFrameAddress () const

Detailed Description

A parsed .debug_frame or .eh_frame section.

Definition at line 215 of file DWARFDebugFrame.h.

Constructor & Destructor Documentation

◆ DWARFDebugFrame()

DWARFDebugFrame::DWARFDebugFrame ( Triple::ArchType Arch,
bool IsEH = false,
uint64_t EHFrameAddress = 0 )

Definition at line 185 of file DWARFDebugFrame.cpp.

◆ ~DWARFDebugFrame()

DWARFDebugFrame::~DWARFDebugFrame ( )
default

References LLVM_ABI, and llvm::Offset.

Member Function Documentation

◆ begin()

iterator llvm::DWARFDebugFrame::begin ( ) const
inline

DWARF Frame entries accessors.

Definition at line 269 of file DWARFDebugFrame.h.

◆ dump()

void DWARFDebugFrame::dump ( raw_ostream & OS,
DIDumpOptions DumpOpts,
std::optional< uint64_t > Offset ) const

Dump the section data into the given stream.

Definition at line 476 of file DWARFDebugFrame.cpp.

References llvm::DIDumpOptions::IsEH, and llvm::Offset.

◆ empty()

bool llvm::DWARFDebugFrame::empty ( ) const
inline

Return whether the section has any entries.

Definition at line 266 of file DWARFDebugFrame.h.

◆ end()

iterator llvm::DWARFDebugFrame::end ( ) const
inline

Definition at line 270 of file DWARFDebugFrame.h.

◆ entries()

iterator_range< iterator > llvm::DWARFDebugFrame::entries ( ) const
inline

Definition at line 271 of file DWARFDebugFrame.h.

◆ getEHFrameAddress()

uint64_t llvm::DWARFDebugFrame::getEHFrameAddress ( ) const
inline

Definition at line 273 of file DWARFDebugFrame.h.

References uint64_t.

◆ parse()

Error DWARFDebugFrame::parse ( DWARFDataExtractor Data,
bool ParseCFIProgram = true )

Parse the section from raw data.

Data is assumed to contain the whole frame section contents to be parsed.

If ParseCFIProgram is false, the CFI instruction program of each entry is not decoded; callers can parse individual programs on demand through parseCFIProgram(), as long as Data stays valid.

Definition at line 201 of file DWARFDebugFrame.cpp.

References llvm::createStringError(), llvm::dwarf::DW_EH_PE_absptr, llvm::dwarf::DW_EH_PE_omit, llvm::dwarf::DWARF64, llvm::StringRef::empty(), llvm::Format, llvm::dwarf::CIE::getAugmentationString(), getCIEId(), llvm::dwarf::CIE::getFDEPointerEncoding(), llvm::dwarf::CIE::getLSDAPointerEncoding(), llvm::invalid_argument, llvm::Length, llvm::Offset, llvm::StringRef::size(), llvm::StringRef::slice(), llvm::Error::success(), and llvm::Version.

◆ parseAllCFIPrograms()

Error DWARFDebugFrame::parseAllCFIPrograms ( ) const

Decode all the CFI instruction programs that parse() was told to skip.

Definition at line 455 of file DWARFDebugFrame.cpp.

References parseCFIProgram(), and llvm::Error::success().

◆ parseCFIProgram()

Error DWARFDebugFrame::parseCFIProgram ( dwarf::FrameEntry & Entry) const

Decode the CFI instruction program of Entry if parse() was told to skip it.

Definition at line 422 of file DWARFDebugFrame.cpp.

References assert(), llvm::createStringError(), llvm::invalid_argument, llvm::Offset, and llvm::Error::success().

Referenced by parseAllCFIPrograms().


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