class CFIProgram
Declaration
class CFIProgram { /* full declaration omitted */ };
Description
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".
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:405
Member Variables
- private std::vector<Instruction> Instructions
- private const uint64_t CodeAlignmentFactor
- private const int64_t DataAlignmentFactor
- private Triple::ArchType Arch
- public static const size_t MaxOperands = 3
Method Overview
- public CFIProgram(uint64_t CodeAlignmentFactor, int64_t DataAlignmentFactor, Triple::ArchType Arch)
- private void addInstruction(uint8_t Opcode, uint64_t Operand1, uint64_t Operand2, uint64_t Operand3)
- private void addInstruction(uint8_t Opcode, uint64_t Operand1, uint64_t Operand2)
- private void addInstruction(uint8_t Opcode, uint64_t Operand1)
- private void addInstruction(uint8_t Opcode)
- public void addInstruction(const llvm::dwarf::CFIProgram::Instruction & I)
- public llvm::dwarf::CFIProgram::iterator begin()
- public llvm::dwarf::CFIProgram::const_iterator begin() const
- public llvm::StringRef callFrameString(unsigned int Opcode) const
- public uint64_t codeAlign() const
- public int64_t dataAlign() const
- public void dump(llvm::raw_ostream & OS, llvm::DIDumpOptions DumpOpts, const llvm::MCRegisterInfo * MRI, bool IsEH, unsigned int IndentLevel = 1) const
- public bool empty() const
- public llvm::dwarf::CFIProgram::const_iterator end() const
- public llvm::dwarf::CFIProgram::iterator end()
- private static ArrayRef<llvm::dwarf::CFIProgram::OperandType[3]> getOperandTypes()
- private static const char * operandTypeString(llvm::dwarf::CFIProgram::OperandType OT)
- public llvm::Error parse(llvm::DWARFDataExtractor Data, uint64_t * Offset, uint64_t EndOffset)
- private void printOperand(llvm::raw_ostream & OS, llvm::DIDumpOptions DumpOpts, const llvm::MCRegisterInfo * MRI, bool IsEH, const llvm::dwarf::CFIProgram::Instruction & Instr, unsigned int OperandIdx, uint64_t Operand) const
- public unsigned int size() const
- public Triple::ArchType triple() const
Methods
¶CFIProgram(uint64_t CodeAlignmentFactor,
int64_t DataAlignmentFactor,
Triple::ArchType Arch)
CFIProgram(uint64_t CodeAlignmentFactor,
int64_t DataAlignmentFactor,
Triple::ArchType Arch)
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:443
Parameters
- uint64_t CodeAlignmentFactor
- int64_t DataAlignmentFactor
- Triple::ArchType Arch
¶void addInstruction(uint8_t Opcode,
uint64_t Operand1,
uint64_t Operand2,
uint64_t Operand3)
void addInstruction(uint8_t Opcode,
uint64_t Operand1,
uint64_t Operand2,
uint64_t Operand3)
Description
Add a new instruction that has three operands.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:488
Parameters
- uint8_t Opcode
- uint64_t Operand1
- uint64_t Operand2
- uint64_t Operand3
¶void addInstruction(uint8_t Opcode,
uint64_t Operand1,
uint64_t Operand2)
void addInstruction(uint8_t Opcode,
uint64_t Operand1,
uint64_t Operand2)
Description
Add a new instruction that has two operands.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:481
Parameters
- uint8_t Opcode
- uint64_t Operand1
- uint64_t Operand2
¶void addInstruction(uint8_t Opcode,
uint64_t Operand1)
void addInstruction(uint8_t Opcode,
uint64_t Operand1)
Description
Add a new single-operand instruction.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:475
Parameters
- uint8_t Opcode
- uint64_t Operand1
¶void addInstruction(uint8_t Opcode)
void addInstruction(uint8_t Opcode)
Description
Convenience method to add a new instruction with the given opcode.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:470
Parameters
- uint8_t Opcode
¶void addInstruction(
const llvm::dwarf::CFIProgram::Instruction& I)
void addInstruction(
const llvm::dwarf::CFIProgram::Instruction& I)
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:458
Parameters
- const llvm::dwarf::CFIProgram::Instruction& I
¶llvm::dwarf::CFIProgram::iterator begin()
llvm::dwarf::CFIProgram::iterator begin()
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:432
¶llvm::dwarf::CFIProgram::const_iterator begin()
const
llvm::dwarf::CFIProgram::const_iterator begin()
const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:433
¶llvm::StringRef callFrameString(
unsigned int Opcode) const
llvm::StringRef callFrameString(
unsigned int Opcode) const
Description
Get a DWARF CFI call frame string for the given DW_CFA opcode.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:461
Parameters
- unsigned int Opcode
¶uint64_t codeAlign() const
uint64_t codeAlign() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:439
¶int64_t dataAlign() const
int64_t dataAlign() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:440
¶void dump(llvm::raw_ostream& OS,
llvm::DIDumpOptions DumpOpts,
const llvm::MCRegisterInfo* MRI,
bool IsEH,
unsigned int IndentLevel = 1) const
void dump(llvm::raw_ostream& OS,
llvm::DIDumpOptions DumpOpts,
const llvm::MCRegisterInfo* MRI,
bool IsEH,
unsigned int IndentLevel = 1) const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:455
Parameters
- llvm::raw_ostream& OS
- llvm::DIDumpOptions DumpOpts
- const llvm::MCRegisterInfo* MRI
- bool IsEH
- unsigned int IndentLevel = 1
¶bool empty() const
bool empty() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:438
¶llvm::dwarf::CFIProgram::const_iterator end()
const
llvm::dwarf::CFIProgram::const_iterator end()
const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:435
¶llvm::dwarf::CFIProgram::iterator end()
llvm::dwarf::CFIProgram::iterator end()
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:434
¶static ArrayRef<
llvm::dwarf::CFIProgram::OperandType[3]>
getOperandTypes()
static ArrayRef<
llvm::dwarf::CFIProgram::OperandType[3]>
getOperandTypes()
Description
Retrieve the array describing the types of operands according to the enum above. This is indexed by opcode.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:520
¶static const char* operandTypeString(
llvm::dwarf::CFIProgram::OperandType OT)
static const char* operandTypeString(
llvm::dwarf::CFIProgram::OperandType OT)
Description
Get the OperandType as a "const char *".
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:516
Parameters
- llvm::dwarf::CFIProgram::OperandType OT
¶llvm::Error parse(llvm::DWARFDataExtractor Data,
uint64_t* Offset,
uint64_t EndOffset)
llvm::Error parse(llvm::DWARFDataExtractor Data,
uint64_t* Offset,
uint64_t EndOffset)
Description
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.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:453
Parameters
- llvm::DWARFDataExtractor Data
- uint64_t* Offset
- uint64_t EndOffset
¶void printOperand(
llvm::raw_ostream& OS,
llvm::DIDumpOptions DumpOpts,
const llvm::MCRegisterInfo* MRI,
bool IsEH,
const llvm::dwarf::CFIProgram::Instruction&
Instr,
unsigned int OperandIdx,
uint64_t Operand) const
void printOperand(
llvm::raw_ostream& OS,
llvm::DIDumpOptions DumpOpts,
const llvm::MCRegisterInfo* MRI,
bool IsEH,
const llvm::dwarf::CFIProgram::Instruction&
Instr,
unsigned int OperandIdx,
uint64_t Operand) const
Description
Print \p Opcode's operand number \p OperandIdx which has value \p Operand.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:523
Parameters
- llvm::raw_ostream& OS
- llvm::DIDumpOptions DumpOpts
- const llvm::MCRegisterInfo* MRI
- bool IsEH
- const llvm::dwarf::CFIProgram::Instruction& Instr
- unsigned int OperandIdx
- uint64_t Operand
¶unsigned int size() const
unsigned int size() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:437
¶Triple::ArchType triple() const
Triple::ArchType triple() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:441