LLVM 20.0.0git
|
Represent a sequence of Call Frame Information instructions that, when read in order, construct a table mapping PC to frame state. More...
#include "llvm/DebugInfo/DWARF/DWARFDebugFrame.h"
Classes | |
struct | Instruction |
An instruction consists of a DWARF CFI opcode and an optional sequence of operands. More... | |
Public Types | |
typedef SmallVector< uint64_t, MaxOperands > | Operands |
using | InstrList = std::vector< Instruction > |
using | iterator = InstrList::iterator |
using | const_iterator = InstrList::const_iterator |
Public Member Functions | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
unsigned | size () const |
bool | empty () const |
uint64_t | codeAlign () const |
int64_t | dataAlign () const |
Triple::ArchType | triple () const |
CFIProgram (uint64_t CodeAlignmentFactor, int64_t DataAlignmentFactor, Triple::ArchType Arch) | |
Error | parse (DWARFDataExtractor Data, uint64_t *Offset, uint64_t EndOffset) |
Parse and store a sequence of CFI instructions from Data, starting at *Offset and ending at EndOffset. | |
void | dump (raw_ostream &OS, DIDumpOptions DumpOpts, unsigned IndentLevel, std::optional< uint64_t > InitialLocation) const |
void | addInstruction (const Instruction &I) |
StringRef | callFrameString (unsigned Opcode) const |
Get a DWARF CFI call frame string for the given DW_CFA opcode. | |
Static Public Attributes | |
static constexpr size_t | MaxOperands = 3 |
Represent a sequence of Call Frame Information instructions that, when read in order, construct a table mapping PC to frame state.
This can also be referred to as "CFI rules" in DWARF literature to avoid confusion with computer programs in the broader sense, and in this context each instruction would be a rule to establish the mapping. Refer to pg. 172 in the DWARF5 manual, "6.4.1 Structure of Call Frame Information".
Definition at line 407 of file DWARFDebugFrame.h.
using llvm::dwarf::CFIProgram::const_iterator = InstrList::const_iterator |
Definition at line 432 of file DWARFDebugFrame.h.
using llvm::dwarf::CFIProgram::InstrList = std::vector<Instruction> |
Definition at line 430 of file DWARFDebugFrame.h.
using llvm::dwarf::CFIProgram::iterator = InstrList::iterator |
Definition at line 431 of file DWARFDebugFrame.h.
Definition at line 410 of file DWARFDebugFrame.h.
|
inline |
Definition at line 445 of file DWARFDebugFrame.h.
|
inline |
|
inline |
Definition at line 434 of file DWARFDebugFrame.h.
|
inline |
Definition at line 435 of file DWARFDebugFrame.h.
Get a DWARF CFI call frame string for the given DW_CFA opcode.
Definition at line 393 of file DWARFDebugFrame.cpp.
References llvm::dwarf::CallFrameString().
Referenced by dump().
|
inline |
Definition at line 441 of file DWARFDebugFrame.h.
Referenced by llvm::dwarf::CFIProgram::Instruction::getOperandAsUnsigned().
|
inline |
Definition at line 442 of file DWARFDebugFrame.h.
Referenced by llvm::dwarf::CFIProgram::Instruction::getOperandAsSigned().
void CFIProgram::dump | ( | raw_ostream & | OS, |
DIDumpOptions | DumpOpts, | ||
unsigned | IndentLevel, | ||
std::optional< uint64_t > | InitialLocation | ||
) | const |
Definition at line 951 of file DWARFDebugFrame.cpp.
References llvm::Address, callFrameString(), llvm::raw_ostream::indent(), and OS.
|
inline |
Definition at line 440 of file DWARFDebugFrame.h.
Referenced by llvm::dwarf::UnwindTable::create().
|
inline |
Definition at line 436 of file DWARFDebugFrame.h.
|
inline |
Definition at line 437 of file DWARFDebugFrame.h.
Error CFIProgram::parse | ( | DWARFDataExtractor | Data, |
uint64_t * | Offset, | ||
uint64_t | EndOffset | ||
) |
Parse and store a sequence of CFI instructions from Data, starting at *Offset and ending at EndOffset.
*Offset is updated to EndOffset upon successful parsing, or indicates the offset where a problem occurred in case an error is returned.
Definition at line 254 of file DWARFDebugFrame.cpp.
References addInstruction(), llvm::CallingConv::C, llvm::createStringError(), llvm::Data, DWARF_CFI_PRIMARY_OPCODE_MASK, DWARF_CFI_PRIMARY_OPERAND_MASK, llvm::illegal_byte_sequence, llvm_unreachable, and llvm::Offset.
|
inline |
Definition at line 439 of file DWARFDebugFrame.h.
|
inline |
Definition at line 443 of file DWARFDebugFrame.h.
|
staticconstexpr |
Definition at line 409 of file DWARFDebugFrame.h.
Referenced by llvm::dwarf::CFIProgram::Instruction::getOperandAsSigned(), and llvm::dwarf::CFIProgram::Instruction::getOperandAsUnsigned().