class UnwindLocation
Declaration
class UnwindLocation { /* full declaration omitted */ };
Description
A class that represents a location for the Call Frame Address (CFA) or a register. This is decoded from the DWARF Call Frame Information instructions and put into an UnwindRow.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:36
Member Variables
- private llvm::dwarf::UnwindLocation::Location Kind
- private uint32_t RegNum
- The type of the location that describes how to unwind it.
- private int32_t Offset
- The register number for Kind == RegPlusOffset.
- private Optional<uint32_t> AddrSpace
- The offset for Kind == CFAPlusOffset or RegPlusOffset.
- private Optional<llvm::DWARFExpression> Expr
- The address space for Kind == RegPlusOffset for CFA.
- private bool Dereference
- The DWARF expression for Kind == DWARFExpression.
Method Overview
- private UnwindLocation(llvm::dwarf::UnwindLocation::Location K, uint32_t Reg, int32_t Off, Optional<uint32_t> AS, bool Deref)
- private UnwindLocation(llvm::DWARFExpression E, bool Deref)
- private UnwindLocation(llvm::dwarf::UnwindLocation::Location K)
- public static llvm::dwarf::UnwindLocation createAtCFAPlusOffset(int32_t Off)
- public static llvm::dwarf::UnwindLocation createAtDWARFExpression(llvm::DWARFExpression Expr)
- public static llvm::dwarf::UnwindLocation createAtRegisterPlusOffset(uint32_t Reg, int32_t Off, Optional<uint32_t> AddrSpace = None)
- public static llvm::dwarf::UnwindLocation createIsCFAPlusOffset(int32_t Off)
- public static llvm::dwarf::UnwindLocation createIsConstant(int32_t Value)
- public static llvm::dwarf::UnwindLocation createIsDWARFExpression(llvm::DWARFExpression Expr)
- public static llvm::dwarf::UnwindLocation createIsRegisterPlusOffset(uint32_t Reg, int32_t Off, Optional<uint32_t> AddrSpace = None)
- public static llvm::dwarf::UnwindLocation createSame()
- public static llvm::dwarf::UnwindLocation createUndefined()
- public static llvm::dwarf::UnwindLocation createUnspecified()
- public void dump(llvm::raw_ostream & OS, const llvm::MCRegisterInfo * MRI, bool IsEH) const
- public uint32_t getAddressSpace() const
- public int32_t getConstant() const
- public Optional<llvm::DWARFExpression> getDWARFExpressionBytes() const
- public llvm::dwarf::UnwindLocation::Location getLocation() const
- public int32_t getOffset() const
- public uint32_t getRegister() const
- public void setConstant(int32_t Value)
- public void setOffset(int32_t NewOffset)
- public void setRegister(uint32_t NewRegNum)
Methods
¶UnwindLocation(
llvm::dwarf::UnwindLocation::Location K,
uint32_t Reg,
int32_t Off,
Optional<uint32_t> AS,
bool Deref)
UnwindLocation(
llvm::dwarf::UnwindLocation::Location K,
uint32_t Reg,
int32_t Off,
Optional<uint32_t> AS,
bool Deref)
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:83
Parameters
- llvm::dwarf::UnwindLocation::Location K
- uint32_t Reg
- int32_t Off
- Optional<uint32_t> AS
- bool Deref
¶UnwindLocation(llvm::DWARFExpression E,
bool Deref)
UnwindLocation(llvm::DWARFExpression E,
bool Deref)
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:87
Parameters
- llvm::DWARFExpression E
- bool Deref
¶UnwindLocation(
llvm::dwarf::UnwindLocation::Location K)
UnwindLocation(
llvm::dwarf::UnwindLocation::Location K)
Description
If true, the resulting location must be dereferenced after the location value is computed.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:79
Parameters
- llvm::dwarf::UnwindLocation::Location K
¶static llvm::dwarf::UnwindLocation
createAtCFAPlusOffset(int32_t Off)
static llvm::dwarf::UnwindLocation
createAtCFAPlusOffset(int32_t Off)
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:109
Parameters
- int32_t Off
¶static llvm::dwarf::UnwindLocation
createAtDWARFExpression(
llvm::DWARFExpression Expr)
static llvm::dwarf::UnwindLocation
createAtDWARFExpression(
llvm::DWARFExpression Expr)
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:128
Parameters
¶static llvm::dwarf::UnwindLocation
createAtRegisterPlusOffset(
uint32_t Reg,
int32_t Off,
Optional<uint32_t> AddrSpace = None)
static llvm::dwarf::UnwindLocation
createAtRegisterPlusOffset(
uint32_t Reg,
int32_t Off,
Optional<uint32_t> AddrSpace = None)
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:122
Parameters
- uint32_t Reg
- int32_t Off
- Optional<uint32_t> AddrSpace = None
¶static llvm::dwarf::UnwindLocation
createIsCFAPlusOffset(int32_t Off)
static llvm::dwarf::UnwindLocation
createIsCFAPlusOffset(int32_t Off)
Description
Create a location that is in (Deref == false) or at (Deref == true) the CFA plus an offset. Most registers that are spilled onto the stack use this rule. The rule for the register will use this rule and specify a unique offset from the CFA with \a Deref set to true. This value will be relative to a CFA value which is typically defined using the register plus offset location.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:108
Parameters
- int32_t Off
¶static llvm::dwarf::UnwindLocation
createIsConstant(int32_t Value)
static llvm::dwarf::UnwindLocation
createIsConstant(int32_t Value)
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:129
Parameters
- int32_t Value
¶static llvm::dwarf::UnwindLocation
createIsDWARFExpression(
llvm::DWARFExpression Expr)
static llvm::dwarf::UnwindLocation
createIsDWARFExpression(
llvm::DWARFExpression Expr)
Description
Create a location whose value is the result of evaluating a DWARF expression. This allows complex expressions to be evaluated in order to unwind a register or CFA value.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:127
Parameters
¶static llvm::dwarf::UnwindLocation
createIsRegisterPlusOffset(
uint32_t Reg,
int32_t Off,
Optional<uint32_t> AddrSpace = None)
static llvm::dwarf::UnwindLocation
createIsRegisterPlusOffset(
uint32_t Reg,
int32_t Off,
Optional<uint32_t> AddrSpace = None)
Description
Create a location where the saved value is in (Deref == false) or at (Deref == true) a regiser plus an offset and, optionally, in the specified address space (used mostly for the CFA). The CFA is usually defined using this rule by using the stack pointer or frame pointer as the register, with an offset that accounts for all spilled registers and all local variables in a function, and Deref == false.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:119
Parameters
- uint32_t Reg
- int32_t Off
- Optional<uint32_t> AddrSpace = None
¶static llvm::dwarf::UnwindLocation createSame()
static llvm::dwarf::UnwindLocation createSame()
Description
Create a location where the value is known to be in the register itself.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:100
¶static llvm::dwarf::UnwindLocation
createUndefined()
static llvm::dwarf::UnwindLocation
createUndefined()
Description
Create a location where the value is undefined and not available. This can happen when a register is volatile and can't be recovered.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:98
¶static llvm::dwarf::UnwindLocation
createUnspecified()
static llvm::dwarf::UnwindLocation
createUnspecified()
Description
Create a location whose rule is set to Unspecified. This means the register value might be in the same register but it wasn't specified in the unwind opcodes.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:95
¶void dump(llvm::raw_ostream& OS,
const llvm::MCRegisterInfo* MRI,
bool IsEH) const
void dump(llvm::raw_ostream& OS,
const llvm::MCRegisterInfo* MRI,
bool IsEH) const
Description
Dump a location expression as text and use the register information if some is provided.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:165
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.
¶uint32_t getAddressSpace() const
uint32_t getAddressSpace() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:134
¶int32_t getConstant() const
int32_t getConstant() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:138
¶Optional<llvm::DWARFExpression>
getDWARFExpressionBytes() const
Optional<llvm::DWARFExpression>
getDWARFExpressionBytes() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:152
¶llvm::dwarf::UnwindLocation::Location
getLocation() const
llvm::dwarf::UnwindLocation::Location
getLocation() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:131
¶int32_t getOffset() const
int32_t getOffset() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:133
¶uint32_t getRegister() const
uint32_t getRegister() const
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:132
¶void setConstant(int32_t Value)
void setConstant(int32_t Value)
Description
Some opcodes modify a constant value and we need to be able to update the constant value (DW_CFA_GNU_window_save which is also known as
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:150
Parameters
- int32_t Value
¶void setOffset(int32_t NewOffset)
void setOffset(int32_t NewOffset)
Description
Some opcodes will modify the CFA location's offset only, so we need to be able to modify the CFA offset when evaluating DWARF Call Frame Information opcodes.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:146
Parameters
- int32_t NewOffset
¶void setRegister(uint32_t NewRegNum)
void setRegister(uint32_t NewRegNum)
Description
Some opcodes will modify the CFA location's register only, so we need to be able to modify the CFA register when evaluating DWARF Call Frame Information opcodes.
Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:142
Parameters
- uint32_t NewRegNum