pub fn fast_backtrace(pc_buffer: &mut [usize]) -> &mut [usize]Expand description
This does a fast, best-effort attempt to collect a backtrace. It writes PC values (return addresses) into the pc_buffer, and returns the subslice of frames collected. The first frame (pc_buffer[0]) will be fast_backtrace() itself (and that’s the only frame guaranteed to be collected), the second will be that frame’s caller, and so on. This is safe even if register and memory state is bogus. It’s best-effort; results will be imprecise in the face of code that doesn’t use either shadow-call-stack or frame pointers.