pub struct UnwindInfo<'a> {
    pub version: u8,
    pub size_of_prolog: u8,
    pub frame_register: Register,
    pub frame_register_offset: u32,
    pub chained_info: Option<RuntimeFunction>,
    pub handler: Option<UnwindHandler<'a>>,
    /* private fields */
}
Expand description

Unwind information for a function or portion of a function.

The unwind info structure is used to record the effects a function has on the stack pointer and where the nonvolatile registers are saved on the stack. The unwind codes can be enumerated with unwind_codes.

This unwind info might only be secondary information, and link to a chained unwind handler. For unwinding, this link shall be followed until the root unwind info record has been resolved.

Fields

version: u8

Version of this unwind info.

size_of_prolog: u8

Length of the function prolog in bytes.

frame_register: Register

The nonvolatile register used as the frame pointer of this function.

If this register is non-zero, all stack frame offsets used in unwind operations are of type StackFrameOffset::FP. When loading these offsets, they have to be based off the value of this frame register instead of the conventional RSP. This allows the RSP to be modified.

frame_register_offset: u32

Offset from RSP that is applied to the FP register when it is established.

When loading offsets of type StackFrameOffset::FP from the stack, this offset has to be subtracted before loading the value since the actual RSP was lower by that amount in the prolog.

chained_info: Option<RuntimeFunction>

A record pointing to chained unwind information.

If chained unwind info is present, then this unwind info is a secondary one and the linked unwind info contains primary information. Chained info is useful in two situations. First, it is used for noncontiguous code segments. Second, this mechanism is sometimes used to group volatile register saves.

The referenced unwind info can itself specify chained unwind information, until it arrives at the root unwind info. Generally, the entire chain should be considered when unwinding.

handler: Option<UnwindHandler<'a>>

An exception or termination handler called as part of the unwind.

Implementations

Parses unwind information from the image at the given offset.

Returns an iterator over unwind codes in this unwind info.

Unwind codes are iterated in descending code_offset order suitable for unwinding. If the optional [chained_info] is present, codes of that unwind info should be interpreted immediately afterwards.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Converts self into T using Into<T>. Read more

Given the context attached to a nom error, and given the original input to the nom parser, extract more the useful context information. Read more

Causes self to use its Binary implementation when Debug-formatted. Read more

Causes self to use its Display implementation when Debug-formatted. Read more

Causes self to use its LowerExp implementation when Debug-formatted. Read more

Causes self to use its LowerHex implementation when Debug-formatted. Read more

Causes self to use its Octal implementation when Debug-formatted. Read more

Causes self to use its Pointer implementation when Debug-formatted. Read more

Causes self to use its UpperExp implementation when Debug-formatted. Read more

Causes self to use its UpperHex implementation when Debug-formatted. Read more

Formats each item in a sequence. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Combine this object with a separator to create a new [Join] instance. Note that the separator does not have to share the same type as the iterator’s values. Read more

Join this object with an empty separator. When rendered with Display, the underlying elements will be directly concatenated. Note that the separator, while empty, is still present, and will show up if you iterate this instance. Read more

Pipes by value. This is generally the method you want to use. Read more

Borrows self and passes that borrow into the pipe function. Read more

Mutably borrows self and passes that borrow into the pipe function. Read more

Borrows self, then passes self.borrow() into the pipe function. Read more

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more

Borrows self, then passes self.as_ref() into the pipe function.

Mutably borrows self, then passes self.as_mut() into the pipe function. Read more

Borrows self, then passes self.deref() into the pipe function.

Mutably borrows self, then passes self.deref_mut() into the pipe function. Read more

Given the original input, as well as the context reported by nom, recreate a context in the original string where the error occurred. Read more

Immutable access to a value. Read more

Mutable access to a value. Read more

Immutable access to the Borrow<B> of a value. Read more

Mutable access to the BorrowMut<B> of a value. Read more

Immutable access to the AsRef<R> view of a value. Read more

Mutable access to the AsMut<R> view of a value. Read more

Immutable access to the Deref::Target of a value. Read more

Mutable access to the Deref::Target of a value. Read more

Calls .tap() only in debug builds, and is erased in release builds.

Calls .tap_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref_mut() only in debug builds, and is erased in release builds. Read more

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

Attempts to convert self into T using TryInto<T>. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.