Struct gimli::read::UninitializedUnwindContext
source · [−]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
sourceimpl<R: Reader> UninitializedUnwindContext<R>
impl<R: Reader> UninitializedUnwindContext<R>
sourcepub fn new() -> UninitializedUnwindContext<R>
pub fn new() -> UninitializedUnwindContext<R>
Construct a new call frame unwinding context.
sourceimpl<R: Reader> UninitializedUnwindContext<R>
impl<R: Reader> UninitializedUnwindContext<R>
Signal Safe Methods
These methods are guaranteed not to allocate, acquire locks, or perform any other signal-unsafe operations.
sourcepub 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
sourceimpl<R: Clone + Reader> Clone for UninitializedUnwindContext<R>
impl<R: Clone + Reader> Clone for UninitializedUnwindContext<R>
sourcefn clone(&self) -> UninitializedUnwindContext<R>
fn clone(&self) -> UninitializedUnwindContext<R>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<R: Debug + Reader> Debug for UninitializedUnwindContext<R>
impl<R: Debug + Reader> Debug for UninitializedUnwindContext<R>
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more