LLVM  3.7.0
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
llvm::FrameEntry Class Referenceabstract

Abstract frame entry defining the common interface concrete entries implement. More...

Collaboration diagram for llvm::FrameEntry:
[legend]

Classes

struct  Instruction
 

Public Types

enum  FrameKind { FK_CIE, FK_FDE }
 

Public Member Functions

 FrameEntry (FrameKind K, uint64_t Offset, uint64_t Length)
 
virtual ~FrameEntry ()
 
FrameKind getKind () const
 
virtual uint64_t getOffset () const
 
virtual void parseInstructions (DataExtractor Data, uint32_t *Offset, uint32_t EndOffset)
 Parse and store a sequence of CFI instructions from Data, starting at *Offset and ending at EndOffset. More...
 
virtual void dumpHeader (raw_ostream &OS) const =0
 Dump the entry header to the given output stream. More...
 
virtual void dumpInstructions (raw_ostream &OS) const
 Dump the entry's instructions to the given output stream. More...
 

Protected Types

typedef std::vector< uint64_t > Operands
 An entry may contain CFI instructions. More...
 

Protected Member Functions

void addInstruction (uint8_t Opcode)
 Convenience methods to add a new instruction with the given opcode and operands to the Instructions vector. More...
 
void addInstruction (uint8_t Opcode, uint64_t Operand1)
 
void addInstruction (uint8_t Opcode, uint64_t Operand1, uint64_t Operand2)
 

Protected Attributes

const FrameKind Kind
 
uint64_t Offset
 Offset of this entry in the section. More...
 
uint64_t Length
 Entry length as specified in DWARF. More...
 
std::vector< InstructionInstructions
 

Detailed Description

Abstract frame entry defining the common interface concrete entries implement.

Definition at line 29 of file DWARFDebugFrame.cpp.

Member Typedef Documentation

typedef std::vector<uint64_t> llvm::FrameEntry::Operands
protected

An entry may contain CFI instructions.

An instruction consists of an opcode and an optional sequence of operands.

Definition at line 65 of file DWARFDebugFrame.cpp.

Member Enumeration Documentation

Enumerator
FK_CIE 
FK_FDE 

Definition at line 31 of file DWARFDebugFrame.cpp.

Constructor & Destructor Documentation

llvm::FrameEntry::FrameEntry ( FrameKind  K,
uint64_t  Offset,
uint64_t  Length 
)
inline

Definition at line 32 of file DWARFDebugFrame.cpp.

virtual llvm::FrameEntry::~FrameEntry ( )
inlinevirtual

Definition at line 35 of file DWARFDebugFrame.cpp.

Member Function Documentation

void llvm::FrameEntry::addInstruction ( uint8_t  Opcode)
inlineprotected

Convenience methods to add a new instruction with the given opcode and operands to the Instructions vector.

Definition at line 79 of file DWARFDebugFrame.cpp.

void llvm::FrameEntry::addInstruction ( uint8_t  Opcode,
uint64_t  Operand1 
)
inlineprotected

Definition at line 83 of file DWARFDebugFrame.cpp.

void llvm::FrameEntry::addInstruction ( uint8_t  Opcode,
uint64_t  Operand1,
uint64_t  Operand2 
)
inlineprotected

Definition at line 88 of file DWARFDebugFrame.cpp.

virtual void llvm::FrameEntry::dumpHeader ( raw_ostream OS) const
pure virtual

Dump the entry header to the given output stream.

void FrameEntry::dumpInstructions ( raw_ostream OS) const
virtual

Dump the entry's instructions to the given output stream.

Definition at line 402 of file DWARFDebugFrame.cpp.

References llvm::dwarf::CallFrameString(), DWARF_CFI_PRIMARY_OPCODE_MASK, llvm::dyn_cast(), and printOperand().

FrameKind llvm::FrameEntry::getKind ( ) const
inline

Definition at line 38 of file DWARFDebugFrame.cpp.

References Kind.

virtual uint64_t llvm::FrameEntry::getOffset ( ) const
inlinevirtual

Definition at line 39 of file DWARFDebugFrame.cpp.

void FrameEntry::parseInstructions ( DataExtractor  Data,
uint32_t *  Offset,
uint32_t  EndOffset 
)
virtual

Parse and store a sequence of CFI instructions from Data, starting at *Offset and ending at EndOffset.

If everything goes well, *Offset should be equal to EndOffset when this method returns. Otherwise, an error occurred.

Definition at line 100 of file DWARFDebugFrame.cpp.

References llvm::dwarf::DW_CFA_advance_loc, llvm::dwarf::DW_CFA_advance_loc1, llvm::dwarf::DW_CFA_advance_loc2, llvm::dwarf::DW_CFA_advance_loc4, llvm::dwarf::DW_CFA_def_cfa, llvm::dwarf::DW_CFA_def_cfa_expression, llvm::dwarf::DW_CFA_def_cfa_offset, llvm::dwarf::DW_CFA_def_cfa_offset_sf, llvm::dwarf::DW_CFA_def_cfa_register, llvm::dwarf::DW_CFA_def_cfa_sf, llvm::dwarf::DW_CFA_expression, llvm::dwarf::DW_CFA_GNU_window_save, llvm::dwarf::DW_CFA_nop, llvm::dwarf::DW_CFA_offset, llvm::dwarf::DW_CFA_offset_extended, llvm::dwarf::DW_CFA_offset_extended_sf, llvm::dwarf::DW_CFA_register, llvm::dwarf::DW_CFA_remember_state, llvm::dwarf::DW_CFA_restore, llvm::dwarf::DW_CFA_restore_extended, llvm::dwarf::DW_CFA_restore_state, llvm::dwarf::DW_CFA_same_value, llvm::dwarf::DW_CFA_set_loc, llvm::dwarf::DW_CFA_undefined, llvm::dwarf::DW_CFA_val_expression, llvm::dwarf::DW_CFA_val_offset, llvm::dwarf::DW_CFA_val_offset_sf, DWARF_CFI_PRIMARY_OPCODE_MASK, DWARF_CFI_PRIMARY_OPERAND_MASK, llvm::DataExtractor::getAddress(), llvm::DataExtractor::getSLEB128(), llvm::DataExtractor::getU16(), llvm::DataExtractor::getU32(), llvm::DataExtractor::getU8(), llvm::DataExtractor::getULEB128(), llvm_unreachable, and llvm::report_fatal_error().

Member Data Documentation

std::vector<Instruction> llvm::FrameEntry::Instructions
protected

Definition at line 75 of file DWARFDebugFrame.cpp.

const FrameKind llvm::FrameEntry::Kind
protected

Definition at line 55 of file DWARFDebugFrame.cpp.

uint64_t llvm::FrameEntry::Length
protected

Entry length as specified in DWARF.

Definition at line 61 of file DWARFDebugFrame.cpp.

uint64_t llvm::FrameEntry::Offset
protected

Offset of this entry in the section.

Definition at line 58 of file DWARFDebugFrame.cpp.


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