[][src]Struct gimli::read::UninitializedUnwindContext

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

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

impl<R: Reader> UninitializedUnwindContext<R>[src]

pub fn new() -> UninitializedUnwindContext<R>[src]

Construct a new call frame unwinding context.

impl<R: Reader> UninitializedUnwindContext<R>[src]

Signal Safe Methods

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

pub fn initialize<Section: UnwindSection<R>>(
    &mut self,
    section: &Section,
    bases: &BaseAddresses,
    cie: &CommonInformationEntry<R>
) -> Result<&mut UnwindContext<R>>
[src]

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

Trait Implementations

impl<R: Clone + Reader> Clone for UninitializedUnwindContext<R>[src]

impl<R: Debug + Reader> Debug for UninitializedUnwindContext<R>[src]

impl<R: Reader> Default for UninitializedUnwindContext<R>[src]

Auto Trait Implementations

impl<R> RefUnwindSafe for UninitializedUnwindContext<R> where
    R: RefUnwindSafe

impl<R> Send for UninitializedUnwindContext<R> where
    R: Send

impl<R> Sync for UninitializedUnwindContext<R> where
    R: Sync

impl<R> Unpin for UninitializedUnwindContext<R>

impl<R> UnwindSafe for UninitializedUnwindContext<R> where
    R: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.