Struct gimli::read::UninitializedUnwindContext [−][src]
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.
pub fn initialize<Section: UnwindSection<R>>(
&mut self,
section: &Section,
bases: &BaseAddresses,
cie: &CommonInformationEntry<R>
) -> Result<&mut UnwindContext<R>>
pub fn initialize<Section: UnwindSection<R>>(
&mut self,
section: &Section,
bases: &BaseAddresses,
cie: &CommonInformationEntry<R>
) -> Result<&mut UnwindContext<R>>
Run the CIE’s initial instructions, creating and return an
UnwindContext
.
Trait Implementations
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
Mutably borrows from an owned value. Read more