class UnwindRow
Declaration
class UnwindRow { /* full declaration omitted */ };
Description
A class that represents a single row in the unwind table that is decoded by parsing the DWARF Call Frame Information opcodes. The row consists of an optional address, the rule to unwind the CFA and all rules to unwind any registers. If the address doesn't have a value, this row represents the initial instructions for a CIE. If the address has a value the UnwindRow represents a row in the UnwindTable for a FDE. The address is the first address for which the CFA location and register rules are valid within a function. UnwindRow objects are created by parsing opcodes in the DWARF Call Frame Information and UnwindRow objects are lazily populated and pushed onto a stack in the UnwindTable when evaluating this state machine. Accessors are needed for the address, CFA value, and register locations as the opcodes encode a state machine that produces a sorted array of UnwindRow objects
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:253
Member Variables
- private Optional<uint64_t> Address
- Address for row in FDE, invalid for CIE.
- private llvm::dwarf::UnwindLocation CFAValue
- How to unwind the Call Frame Address (CFA).
- private llvm::dwarf::RegisterLocations RegLocs
- How to unwind all registers in this list.
Method Overview
- public UnwindRow()
- public void dump(llvm::raw_ostream & OS, const llvm::MCRegisterInfo * MRI, bool IsEH, unsigned int IndentLevel = 0) const
- public uint64_t getAddress() const
- public llvm::dwarf::UnwindLocation & getCFAValue()
- public const llvm::dwarf::UnwindLocation & getCFAValue() const
- public llvm::dwarf::RegisterLocations & getRegisterLocations()
- public const llvm::dwarf::RegisterLocations & getRegisterLocations() const
- public bool hasAddress() const
- public void setAddress(uint64_t Addr)
- public void slideAddress(uint64_t Offset)
Methods
¶UnwindRow()
UnwindRow()
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:261
¶void dump(llvm::raw_ostream& OS,
const llvm::MCRegisterInfo* MRI,
bool IsEH,
unsigned int IndentLevel = 0) const
void dump(llvm::raw_ostream& OS,
const llvm::MCRegisterInfo* MRI,
bool IsEH,
unsigned int IndentLevel = 0) const
Description
Dump the UnwindRow to the stream.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:304
Parameters
- llvm::raw_ostream& OS
- the stream to use for output.
- const llvm::MCRegisterInfo* MRI
- register information that helps emit register names insteead of raw register numbers.
- bool IsEH
- true if the DWARF Call Frame Information is from .eh_frame instead of from .debug_frame. This is needed for register number conversion because some register numbers differ between the two sections for certain architectures like x86.
- unsigned int IndentLevel = 0
- specify the indent level as an integer. The UnwindRow will be output to the stream preceded by 2 * IndentLevel number of spaces.
¶uint64_t getAddress() const
uint64_t getAddress() const
Description
Get the address for this row. Clients should only call this function after verifying it has a valid address with a call to
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:270
¶llvm::dwarf::UnwindLocation& getCFAValue()
llvm::dwarf::UnwindLocation& getCFAValue()
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:285
¶const llvm::dwarf::UnwindLocation& getCFAValue()
const
const llvm::dwarf::UnwindLocation& getCFAValue()
const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:286
¶llvm::dwarf::RegisterLocations&
getRegisterLocations()
llvm::dwarf::RegisterLocations&
getRegisterLocations()
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:287
¶const llvm::dwarf::RegisterLocations&
getRegisterLocations() const
const llvm::dwarf::RegisterLocations&
getRegisterLocations() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:288
¶bool hasAddress() const
bool hasAddress() const
Description
Returns true if the address is valid in this object.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:264
¶void setAddress(uint64_t Addr)
void setAddress(uint64_t Addr)
Description
Set the address for this UnwindRow. The address represents the first address for which the CFAValue and RegLocs are valid within a function.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:276
Parameters
- uint64_t Addr
¶void slideAddress(uint64_t Offset)
void slideAddress(uint64_t Offset)
Description
Offset the address for this UnwindRow. The address represents the first address for which the CFAValue and RegLocs are valid within a function. Clients must ensure that this object already has an address (
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:284
Parameters
- uint64_t Offset