← all modules
module

stdlib::backtrace

defined in C:\Users\bye45\.glide\bin/src/stdlib/backtrace.glide

Return the current call stack, one frame per element. The first

fn fn stack_trace() -> *Vector<string>

Return the current call stack, one frame per element. The first entry is stack_trace's caller; the unwinder itself is filtered out. Returns an empty vector when the platform can't walk the stack (typically -O2 with frame pointers omitted).

glide
fn buggy() {
    for f in stack_trace() { println!(f); }
}
fn fn stack_trace_skip(n: int) -> *Vector<string>

Same as stack_trace but skips the first n frames closest to the caller. Useful when the caller is itself a thin shim (e.g. a log_error! macro expansion) that should be hidden.