pub struct UninitializedUnwindContext<R: Reader>(_);
Expand description

Common context needed when evaluating the call frame unwinding information.

To avoid re-allocating the context multiple times when evaluating multiple CFI programs, it can be reused. At first, a context is uninitialized (UninitializedUnwindContext). It can be initialized by providing the CommonInformationEntry for the CFI program about to be evaluated and calling UninitializedUnwindContext::initialize. The result is a &mut UnwindContext which borrows the uninitialized context, and can be used to evaluate and run a FrameDescriptionEntry’s CFI program.

use gimli::{UninitializedUnwindContext, UnwindTable};

// An uninitialized context.
let mut ctx = UninitializedUnwindContext::new();

// Initialize the context by evaluating the CIE's initial instruction program,
// and generate the unwind table.
let mut table = some_fde.rows(&eh_frame, &bases, &mut ctx)?;
while let Some(row) = table.next_row()? {
    // Do stuff with each row...
}

Implementations

Construct a new call frame unwinding context.

Signal Safe Methods

These methods are guaranteed not to allocate, acquire locks, or perform any other signal-unsafe operations.

Run the CIE’s initial instructions, creating and return an UnwindContext.

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

Returns the “default value” for a type. 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

Returns the argument unchanged.

Calls U::from(self).

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

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

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.