Struct unwind::StackFrame

source ·
pub struct StackFrame { /* private fields */ }
Expand description

A single frame in the stack, which contains unwinding-related information for a single function call’s stack frame.

See each method for documentation about the members of this struct.

Implementations§

source§

impl StackFrame

source

pub fn personality(&self) -> Option<u64>

The address of the personality function that corresponds to this stack frame’s unwinding routine, if needed for this stack frame. In Rust, this is always the same function, the one defined as the eh_personality language item, something required by the compiler.

Note that in Theseus we do not use a personality function, as we use a custom unwinding flow that bypasses invoking the personality function.

source

pub fn lsda(&self) -> Option<u64>

The address of the Language-Specific Data Area (LSDA) that is needed to discover the unwinding cleanup routines (landing pads) for this stack frame. Typically, this points to an area within a .gcc_except_table section, which then needs to be parsed.

source

pub fn call_site_address(&self) -> u64

The call site of this stack frame, i.e., the address of the instruction that called the next function in the call stack.

source

pub fn initial_address(&self) -> u64

The address (starting instruction pointer) of the function corresponding to this stack frame. This points to the top (entry point) of that function.

Trait Implementations§

source§

impl Debug for StackFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.