Crate stack_trace_frame_pointers
source ·Expand description
Stack trace (backtrace) functionality using frame pointers.
There are two main ways of obtaining stack traces:
- Using the frame pointer register to find the previous stack frame.
- Using DWARF debugging information to understand the layout of each stack frame.
We support both ways, but prefer #2 because it doesn’t suffer from the
compatibility and performance drawbacks of #1.
See the stack_trace
crate for the #2 functionality.
This crate offers support for #1.
The advantage of using this is that it doesn’t require any significant dependencies.
However, this crate’s frame pointer-based stack traces are only available
when the compiler has been configured to emit frame pointers,
which in Rust is achieved via the -C force-frame-pointers=yes
rust flags option.