mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-09 00:00:17 +03:00
Rust has this in the standard library - nice. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
7 lines
173 B
Rust
7 lines
173 B
Rust
// This will show C frames in the backtrace
|
|
#[no_mangle]
|
|
pub extern "C" fn dump_stack() {
|
|
let bt = std::backtrace::Backtrace::force_capture();
|
|
println!("{}", bt);
|
|
}
|