[−][src]Struct unwind::Cursor
A cursor into a frame of a stack.
The cursor starts at the current (topmost) frame, and can be advanced downwards through the stack. While a cursor cannot be run "backwards", it can be cloned, and one of the copies advanced while the other continues to refer to the previous frame.
Methods
impl<'a> Cursor<'a>
[src]
impl<'a> Cursor<'a>
pub fn local<F, T>(f: F) -> Result<T> where
F: FnOnce(Cursor) -> Result<T>,
[src]
pub fn local<F, T>(f: F) -> Result<T> where
F: FnOnce(Cursor) -> Result<T>,
Creates a cursor over the stack of the calling thread.
The cursor is provided to a closure rather than being returned because the stack frame being referenced by the cursor must remain alive.
pub fn remote<T>(
address_space: &'a AddressSpaceRef<T>,
state: &'a T
) -> Result<Cursor<'a>>
[src]
pub fn remote<T>(
address_space: &'a AddressSpaceRef<T>,
state: &'a T
) -> Result<Cursor<'a>>
Creates a cursor over the stack of a "remote" process.
pub fn step(&mut self) -> Result<bool>
[src]
pub fn step(&mut self) -> Result<bool>
Steps the cursor into the next older stack frame.
A return value of false
indicates that the cursor is at the last frame of the stack.
pub fn register(&mut self, num: RegNum) -> Result<u64>
[src]
pub fn register(&mut self, num: RegNum) -> Result<u64>
Returns the value of an integral register at the current frame.
Based on the calling convention, some registers may not be available in a stack frame.
pub fn procedure_info(&mut self) -> Result<ProcedureInfo>
[src]
pub fn procedure_info(&mut self) -> Result<ProcedureInfo>
Returns information about the procedure at the current frame.
pub fn procedure_name_raw(
&mut self,
buf: &mut [u8],
offset: &mut u64
) -> Result<()>
[src]
pub fn procedure_name_raw(
&mut self,
buf: &mut [u8],
offset: &mut u64
) -> Result<()>
Returns the name of the procedure of the current frame.
The name is copied into the provided buffer, and is null-terminated. If the buffer is too
small to hold the full name, Error::NOMEM
is returned and the buffer contains the
portion of the name that fits (including the null terminator).
The offset of the instruction pointer from the beginning of the identified procedure is
copied into the offset
parameter.
The procedure_name
method provides a higher level wrapper over this method.
In certain contexts, particularly when the binary being unwound has been stripped, the unwinder may not have enough information to properly identify the procedure and will simply return the first label before the frame's instruction pointer. The offset will always be relative to this label.
pub fn procedure_name(&mut self) -> Result<ProcedureName>
[src]
pub fn procedure_name(&mut self) -> Result<ProcedureName>
Returns the name of the procedure of the current frame.
In certain contexts, particularly when the binary being unwound has been stripped, the unwinder may not have enough information to properly identify the procedure and will simply return the first label before the frame's instruction pointer. The offset will always be relative to this label.
pub fn is_signal_frame(&mut self) -> Result<bool>
[src]
pub fn is_signal_frame(&mut self) -> Result<bool>
Determines if the current frame is a signal frame.
Signal frames are unique in several ways. More register state is available than normal, and the instruction pointer references the currently executing instruction rather than the next instruction.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T