hopframe
A simple, easy wrapper for framehop. Currently available for linux only, supporting x86_64 and aarch64 architectures.
Usage
Here is a basic usage:
use ;
async
You need to use RUSTFLAGS="-C force-frame-pointers=yes" flag.
$ RUSTFLAGS="-C force-frame-pointers=yes" cargo run --example basic
frame: InstructionPointer(94006149978623) symbol: Some("hopframe::StackUnwinderX86_64::unwind")
frame: ReturnAddress(94006148593726) symbol: Some("basic::main::{{closure}}")
frame: ReturnAddress(94006147962242) symbol: Some("tokio::runtime::park::CachedParkThread::block_on::{{closure}}")
frame: ReturnAddress(94006147960790) symbol: Some("tokio::runtime::park::CachedParkThread::block_on")
frame: ReturnAddress(94006149394329) symbol: Some("tokio::runtime::context::blocking::BlockingRegionGuard::block_on")
frame: ReturnAddress(94006148068576) symbol: Some("tokio::runtime::scheduler::multi_thread::MultiThread::block_on::{{closure}}")
frame: ReturnAddress(94006149464552) symbol: Some("tokio::runtime::context::runtime::enter_runtime")
frame: ReturnAddress(94006148068491) symbol: Some("tokio::runtime::scheduler::multi_thread::MultiThread::block_on")
frame: ReturnAddress(94006148098756) symbol: Some("tokio::runtime::runtime::Runtime::block_on")
frame: ReturnAddress(94006148264083) symbol: Some("basic::main")
frame: ReturnAddress(94006149083790) symbol: Some("core::ops::function::FnOnce::call_once")
frame: ReturnAddress(94006147746145) symbol: Some("std::sys_common::backtrace::__rust_begin_short_backtrace")
frame: ReturnAddress(94006149464100) symbol: Some("std::rt::lang_start::{{closure}}")
frame: ReturnAddress(94006159644801) symbol: Some("std::rt::lang_start_internal")
Platform Support
| OS | aarch64 | x86_64 |
|---|---|---|
| linux | ❌ | ✅ |
| windows | ❌ | ❌ |
| macos | ✅ | ✅ |