Function backtrace::resolve_frame

source ·
pub fn resolve_frame<F: FnMut(&Symbol)>(frame: &Frame, cb: F)
Expand description

Resolve a previously capture frame to a symbol, passing the symbol to the specified closure.

This function performs the same function as resolve except that it takes a Frame as an argument instead of an address. This can allow some platform implementations of backtracing to provide more accurate symbol information or information about inline frames for example. It’s recommended to use this if you can.

§Required features

This function requires the std feature of the backtrace crate to be enabled, and the std feature is enabled by default.


This function strives to never panic, but if the cb provided panics then some platforms will force a double panic to abort the process. Some platforms use a C library which internally uses callbacks which cannot be unwound through, so panicking from cb may trigger a process abort.


extern crate backtrace;

fn main() {
    backtrace::trace(|frame| {
        backtrace::resolve_frame(frame, |symbol| {
            // ...

        false // only look at the top frame