StackTrace

Struct StackTrace 

Source
pub struct StackTrace;
Expand description

A structure representing a stack trace.

Implementations§

Source§

impl StackTrace

Source

pub unsafe fn dump_with(stack_frame: StackFrame) -> StResult<()>

Dumps the stack trace for the given PC, SP, and FP values.

§Safety

This function is marked unsafe to indicate that the caller is responsible for validating the provided PC, SP, and FP values. Invalid values can result in undefined behavior, including potential page faults.

# Child-SP              Return Address         Call Site
0 0000005E2AEFFC00      00007FFB10CB4508       aarch64+44B0
1 0000005E2AEFFC20      00007FFB10CB45A0       aarch64+4508
2 0000005E2AEFFC40      00007FFB10CB4640       aarch64+45A0
3 0000005E2AEFFC60      00007FFB10CB46D4       aarch64+4640
4 0000005E2AEFFC90      00007FF760473B98       aarch64+46D4
5 0000005E2AEFFCB0      00007FFB8F062310       patina_stacktrace-45f5092641a5979a+3B98
6 0000005E2AEFFD10      00007FFB8FF95AEC       kernel32+12310
7 0000005E2AEFFD50      0000000000000000       ntdll+75AEC
Source

pub unsafe fn dump() -> StResult<()>

Dumps the stack trace. This function reads the PC, SP, and FP values and attempts to dump the call stack.

§Safety

It is marked unsafe to indicate that the caller is responsible for the validity of the PC, SP, and FP values. Invalid or corrupt machine state can result in undefined behavior, including potential page faults.

# Child-SP              Return Address         Call Site
0 0000005E2AEFFC00      00007FFB10CB4508       aarch64+44B0
1 0000005E2AEFFC20      00007FFB10CB45A0       aarch64+4508
2 0000005E2AEFFC40      00007FFB10CB4640       aarch64+45A0
3 0000005E2AEFFC60      00007FFB10CB46D4       aarch64+4640
4 0000005E2AEFFC90      00007FF760473B98       aarch64+46D4
5 0000005E2AEFFCB0      00007FFB8F062310       patina_stacktrace-45f5092641a5979a+3B98
6 0000005E2AEFFD10      00007FFB8FF95AEC       kernel32+12310
7 0000005E2AEFFD50      0000000000000000       ntdll+75AEC

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.