Struct unwind::Cursor [] [src]

pub struct Cursor<'a>(_, _);

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]

[src]

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 frame must remain alive.

[src]

Creates a cursor over the stack of a "remote" process.

[src]

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.

[src]

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.

[src]

Returns information about the procedure at the current frame.

[src]

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.

[src]

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.

[src]

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

impl<'a> Clone for Cursor<'a>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more