LLVM  6.0.0svn
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:
Collaboration graph
[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 ()=default
 
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...
 
void dump (raw_ostream &OS) const
 Dump the entire entry to the given output stream. More...
 

Protected Types

using Operands = std::vector< uint64_t >
 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 36 of file DWARFDebugFrame.cpp.

Member Typedef Documentation

◆ Operands

using llvm::FrameEntry::Operands = std::vector<uint64_t>
protected

An entry may contain CFI instructions.

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

Definition at line 79 of file DWARFDebugFrame.cpp.

Member Enumeration Documentation

◆ FrameKind

Enumerator
FK_CIE 
FK_FDE 

Definition at line 38 of file DWARFDebugFrame.cpp.

Constructor & Destructor Documentation

◆ FrameEntry()

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

Definition at line 40 of file DWARFDebugFrame.cpp.

◆ ~FrameEntry()

virtual llvm::FrameEntry::~FrameEntry ( )
virtualdefault

Member Function Documentation

◆ addInstruction() [1/3]

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 93 of file DWARFDebugFrame.cpp.

◆ addInstruction() [2/3]

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

Definition at line 97 of file DWARFDebugFrame.cpp.

◆ addInstruction() [3/3]

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

Definition at line 102 of file DWARFDebugFrame.cpp.

◆ dump()

void llvm::FrameEntry::dump ( raw_ostream OS) const
inline

Dump the entire entry to the given output stream.

Definition at line 62 of file DWARFDebugFrame.cpp.

◆ dumpHeader()

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

Dump the entry header to the given output stream.

◆ dumpInstructions()

void FrameEntry::dumpInstructions ( raw_ostream OS) const
virtual

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

Definition at line 457 of file DWARFDebugFrame.cpp.

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

◆ getKind()

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

Definition at line 45 of file DWARFDebugFrame.cpp.

References Kind.

Referenced by parseInstructions().

◆ getOffset()

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

Definition at line 46 of file DWARFDebugFrame.cpp.

References llvm::Data.

◆ parseInstructions()

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 113 of file DWARFDebugFrame.cpp.

References llvm::dwarf::DW_CIE_ID, DWARF_CFI_PRIMARY_OPCODE_MASK, DWARF_CFI_PRIMARY_OPERAND_MASK, llvm::SmallVectorBase::empty(), llvm::format(), llvm::DataExtractor::getAddress(), getDataAlignmentFactor(), getKind(), llvm::DataExtractor::getSLEB128(), llvm::DataExtractor::getU16(), llvm::DataExtractor::getU32(), llvm::DataExtractor::getU8(), llvm::DataExtractor::getULEB128(), llvm::hexdigit(), llvm_unreachable, and llvm::IndexedInstrProf::Version.

Member Data Documentation

◆ Instructions

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

Definition at line 89 of file DWARFDebugFrame.cpp.

◆ Kind

const FrameKind llvm::FrameEntry::Kind
protected

Definition at line 69 of file DWARFDebugFrame.cpp.

◆ Length

uint64_t llvm::FrameEntry::Length
protected

Entry length as specified in DWARF.

Definition at line 75 of file DWARFDebugFrame.cpp.

◆ Offset

uint64_t llvm::FrameEntry::Offset
protected

Offset of this entry in the section.

Definition at line 72 of file DWARFDebugFrame.cpp.


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