Struct mini_backtrace::Backtrace [−][src]
pub struct Backtrace<const N: usize> {
pub frames: ArrayVec<usize, N>,
pub frames_omitted: bool,
}
Expand description
A backtrace consisting of a list of instruction pointer addresses.
The backtrace does not allocate any memory, which allows it to be used in environments where dynamic allocation cannot be used such as signal handlers or interrupt handlers.
The N
generic constant controls the maximum number of entries that should
be included in the backtrace. Usually 16 frames are enough to get sufficient
context from a crash.
Fields
frames: ArrayVec<usize, N>
List of instruction pointer addresses in each frame, from most recent to oldest.
These are not precise return address: the addresses are adjusted so that they point within the bounds of the caller function. This avoids issues when a call instruction is the last instruction in a function, which would otherwise result in a return address pointing at the start of the next function.
frames_omitted: bool
Whether any frames have been omitted due to exceeding the capacity of
the ArrayVec
.