Enum gimli::read::CallFrameInstruction

source ·
#[non_exhaustive]
pub enum CallFrameInstruction<T: ReaderOffset> {
Show 23 variants SetLoc { address: u64, }, AdvanceLoc { delta: u32, }, DefCfa { register: Register, offset: u64, }, DefCfaSf { register: Register, factored_offset: i64, }, DefCfaRegister { register: Register, }, DefCfaOffset { offset: u64, }, DefCfaOffsetSf { factored_offset: i64, }, DefCfaExpression { expression: UnwindExpression<T>, }, Undefined { register: Register, }, SameValue { register: Register, }, Offset { register: Register, factored_offset: u64, }, OffsetExtendedSf { register: Register, factored_offset: i64, }, ValOffset { register: Register, factored_offset: u64, }, ValOffsetSf { register: Register, factored_offset: i64, }, Register { dest_register: Register, src_register: Register, }, Expression { register: Register, expression: UnwindExpression<T>, }, ValExpression { register: Register, expression: UnwindExpression<T>, }, Restore { register: Register, }, RememberState, RestoreState, ArgsSize { size: u64, }, NegateRaState, Nop,
}
Expand description

A parsed call frame instruction.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

SetLoc

  1. DW_CFA_set_loc

The DW_CFA_set_loc instruction takes a single operand that represents a target address. The required action is to create a new table row using the specified address as the location. All other values in the new row are initially identical to the current row. The new location value is always greater than the current one. If the segment_size field of this FDE’s CIE is non- zero, the initial location is preceded by a segment selector of the given length.

Fields

§address: u64

The target address.

§

AdvanceLoc

The AdvanceLoc instruction is used for all of DW_CFA_advance_loc and DW_CFA_advance_loc{1,2,4}.

  1. DW_CFA_advance_loc

The DW_CFA_advance instruction takes a single operand (encoded with the opcode) that represents a constant delta. The required action is to create a new table row with a location value that is computed by taking the current entry’s location value and adding the value of delta * code_alignment_factor. All other values in the new row are initially identical to the current row.

Fields

§delta: u32

The delta to be added to the current address.

§

DefCfa

  1. DW_CFA_def_cfa

The DW_CFA_def_cfa instruction takes two unsigned LEB128 operands representing a register number and a (non-factored) offset. The required action is to define the current CFA rule to use the provided register and offset.

Fields

§register: Register

The target register’s number.

§offset: u64

The non-factored offset.

§

DefCfaSf

  1. DW_CFA_def_cfa_sf

The DW_CFA_def_cfa_sf instruction takes two operands: an unsigned LEB128 value representing a register number and a signed LEB128 factored offset. This instruction is identical to DW_CFA_def_cfa except that the second operand is signed and factored. The resulting offset is factored_offset * data_alignment_factor.

Fields

§register: Register

The target register’s number.

§factored_offset: i64

The factored offset.

§

DefCfaRegister

  1. DW_CFA_def_cfa_register

The DW_CFA_def_cfa_register instruction takes a single unsigned LEB128 operand representing a register number. The required action is to define the current CFA rule to use the provided register (but to keep the old offset). This operation is valid only if the current CFA rule is defined to use a register and offset.

Fields

§register: Register

The target register’s number.

§

DefCfaOffset

  1. DW_CFA_def_cfa_offset

The DW_CFA_def_cfa_offset instruction takes a single unsigned LEB128 operand representing a (non-factored) offset. The required action is to define the current CFA rule to use the provided offset (but to keep the old register). This operation is valid only if the current CFA rule is defined to use a register and offset.

Fields

§offset: u64

The non-factored offset.

§

DefCfaOffsetSf

  1. DW_CFA_def_cfa_offset_sf

The DW_CFA_def_cfa_offset_sf instruction takes a signed LEB128 operand representing a factored offset. This instruction is identical to DW_CFA_def_cfa_offset except that the operand is signed and factored. The resulting offset is factored_offset * data_alignment_factor. This operation is valid only if the current CFA rule is defined to use a register and offset.

Fields

§factored_offset: i64

The factored offset.

§

DefCfaExpression

  1. DW_CFA_def_cfa_expression

The DW_CFA_def_cfa_expression instruction takes a single operand encoded as a DW_FORM_exprloc value representing a DWARF expression. The required action is to establish that expression as the means by which the current CFA is computed.

Fields

§expression: UnwindExpression<T>

The location of the DWARF expression.

§

Undefined

  1. DW_CFA_undefined

The DW_CFA_undefined instruction takes a single unsigned LEB128 operand that represents a register number. The required action is to set the rule for the specified register to “undefined.”

Fields

§register: Register

The target register’s number.

§

SameValue

  1. DW_CFA_same_value

The DW_CFA_same_value instruction takes a single unsigned LEB128 operand that represents a register number. The required action is to set the rule for the specified register to “same value.”

Fields

§register: Register

The target register’s number.

§

Offset

The Offset instruction represents both DW_CFA_offset and DW_CFA_offset_extended.

  1. DW_CFA_offset

The DW_CFA_offset instruction takes two operands: a register number (encoded with the opcode) and an unsigned LEB128 constant representing a factored offset. The required action is to change the rule for the register indicated by the register number to be an offset(N) rule where the value of N is factored offset * data_alignment_factor.

Fields

§register: Register

The target register’s number.

§factored_offset: u64

The factored offset.

§

OffsetExtendedSf

  1. DW_CFA_offset_extended_sf

The DW_CFA_offset_extended_sf instruction takes two operands: an unsigned LEB128 value representing a register number and a signed LEB128 factored offset. This instruction is identical to DW_CFA_offset_extended except that the second operand is signed and factored. The resulting offset is factored_offset * data_alignment_factor.

Fields

§register: Register

The target register’s number.

§factored_offset: i64

The factored offset.

§

ValOffset

  1. DW_CFA_val_offset

The DW_CFA_val_offset instruction takes two unsigned LEB128 operands representing a register number and a factored offset. The required action is to change the rule for the register indicated by the register number to be a val_offset(N) rule where the value of N is factored_offset * data_alignment_factor.

Fields

§register: Register

The target register’s number.

§factored_offset: u64

The factored offset.

§

ValOffsetSf

  1. DW_CFA_val_offset_sf

The DW_CFA_val_offset_sf instruction takes two operands: an unsigned LEB128 value representing a register number and a signed LEB128 factored offset. This instruction is identical to DW_CFA_val_offset except that the second operand is signed and factored. The resulting offset is factored_offset * data_alignment_factor.

Fields

§register: Register

The target register’s number.

§factored_offset: i64

The factored offset.

§

Register

  1. DW_CFA_register

The DW_CFA_register instruction takes two unsigned LEB128 operands representing register numbers. The required action is to set the rule for the first register to be register(R) where R is the second register.

Fields

§dest_register: Register

The number of the register whose rule is being changed.

§src_register: Register

The number of the register where the other register’s value can be found.

§

Expression

  1. DW_CFA_expression

The DW_CFA_expression instruction takes two operands: an unsigned LEB128 value representing a register number, and a DW_FORM_block value representing a DWARF expression. The required action is to change the rule for the register indicated by the register number to be an expression(E) rule where E is the DWARF expression. That is, the DWARF expression computes the address. The value of the CFA is pushed on the DWARF evaluation stack prior to execution of the DWARF expression.

Fields

§register: Register

The target register’s number.

§expression: UnwindExpression<T>

The location of the DWARF expression.

§

ValExpression

  1. DW_CFA_val_expression

The DW_CFA_val_expression instruction takes two operands: an unsigned LEB128 value representing a register number, and a DW_FORM_block value representing a DWARF expression. The required action is to change the rule for the register indicated by the register number to be a val_expression(E) rule where E is the DWARF expression. That is, the DWARF expression computes the value of the given register. The value of the CFA is pushed on the DWARF evaluation stack prior to execution of the DWARF expression.

Fields

§register: Register

The target register’s number.

§expression: UnwindExpression<T>

The location of the DWARF expression.

§

Restore

The Restore instruction represents both DW_CFA_restore and DW_CFA_restore_extended.

  1. DW_CFA_restore

The DW_CFA_restore instruction takes a single operand (encoded with the opcode) that represents a register number. The required action is to change the rule for the indicated register to the rule assigned it by the initial_instructions in the CIE.

Fields

§register: Register

The register to be reset.

§

RememberState

  1. DW_CFA_remember_state

The DW_CFA_remember_state instruction takes no operands. The required action is to push the set of rules for every register onto an implicit stack.

§

RestoreState

  1. DW_CFA_restore_state

The DW_CFA_restore_state instruction takes no operands. The required action is to pop the set of rules off the implicit stack and place them in the current row.

§

ArgsSize

DW_CFA_GNU_args_size

GNU Extension

The DW_CFA_GNU_args_size instruction takes an unsigned LEB128 operand representing an argument size. This instruction specifies the total of the size of the arguments which have been pushed onto the stack.

Fields

§size: u64

The size of the arguments which have been pushed onto the stack

§

NegateRaState

DW_CFA_AARCH64_negate_ra_state

AArch64 Extension

The DW_CFA_AARCH64_negate_ra_state operation negates bit 0 of the RA_SIGN_STATE pseudo-register. It does not take any operands. The DW_CFA_AARCH64_negate_ra_state must not be mixed with other DWARF Register Rule Instructions on the RA_SIGN_STATE pseudo-register in one Common Information Entry (CIE) and Frame Descriptor Entry (FDE) program sequence.

§

Nop

  1. DW_CFA_nop

The DW_CFA_nop instruction has no operands and no required actions. It is used as padding to make a CIE or FDE an appropriate size.

Trait Implementations§

source§

impl<T: Clone + ReaderOffset> Clone for CallFrameInstruction<T>

source§

fn clone(&self) -> CallFrameInstruction<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug + ReaderOffset> Debug for CallFrameInstruction<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: PartialEq + ReaderOffset> PartialEq for CallFrameInstruction<T>

source§

fn eq(&self, other: &CallFrameInstruction<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: Eq + ReaderOffset> Eq for CallFrameInstruction<T>

source§

impl<T: ReaderOffset> StructuralPartialEq for CallFrameInstruction<T>

Auto Trait Implementations§

§

impl<T> Freeze for CallFrameInstruction<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for CallFrameInstruction<T>
where T: RefUnwindSafe,

§

impl<T> Send for CallFrameInstruction<T>
where T: Send,

§

impl<T> Sync for CallFrameInstruction<T>
where T: Sync,

§

impl<T> Unpin for CallFrameInstruction<T>
where T: Unpin,

§

impl<T> UnwindSafe for CallFrameInstruction<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.