[−][src]Struct goblin::pe::exception::UnwindInfo
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.
Methods
impl<'a> UnwindInfo<'a>
[src]
pub fn parse(bytes: &'a [u8], offset: usize) -> Result<Self>
[src]
Parses unwind information from the image at the given offset.
ⓘImportant traits for UnwindCodeIterator<'_>pub fn unwind_codes(&self) -> UnwindCodeIterator<'a>
[src]
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
impl<'a> Clone for UnwindInfo<'a>
[src]
fn clone(&self) -> UnwindInfo<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a, '_> IntoIterator for &'_ UnwindInfo<'a>
[src]
type Item = Result<UnwindCode>
The type of the elements being iterated over.
type IntoIter = UnwindCodeIterator<'a>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<'_> Debug for UnwindInfo<'_>
[src]
Auto Trait Implementations
impl<'a> Sync for UnwindInfo<'a>
impl<'a> Send for UnwindInfo<'a>
impl<'a> Unpin for UnwindInfo<'a>
impl<'a> RefUnwindSafe for UnwindInfo<'a>
impl<'a> UnwindSafe for UnwindInfo<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,