MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / visit_frames

Function visit_frames

crates/unwinder/src/stackwalk.rs:324–337  ·  view source on GitHub ↗

Walk through a contiguous sequence of Wasm frames starting with the frame at the given PC and FP and ending at `trampoline_fp`. This FP should correspond to that of a trampoline that was used to enter the Wasm code. We require that the initial PC, FP, and `trampoline_fp` values are non-null (non-zero). # Safety This function is not safe as `unwind`, `pc`, `fp`, and `trampoline_fp` must all be "

(
    unwind: &dyn Unwind,
    pc: usize,
    fp: usize,
    trampoline_fp: usize,
    mut f: impl FnMut(Frame) -> ControlFlow<R>,
)

Source from the content-addressed store, hash-verified

322/// compiled code which respects the frame pointers that Wasmtime currently
323/// requires.
324pub unsafe fn visit_frames<R>(
325 unwind: &dyn Unwind,
326 pc: usize,
327 fp: usize,
328 trampoline_fp: usize,
329 mut f: impl FnMut(Frame) -> ControlFlow<R>,
330) -> ControlFlow<R> {
331 let iter = unsafe { frame_iterator(unwind, pc, fp, trampoline_fp) };
332 for frame in iter {
333 f(frame)?;
334 }
335
336 ControlFlow::Continue(())
337}

Callers 4

findMethod · 0.85
new_with_trap_stateMethod · 0.85
traceMethod · 0.85

Calls 2

frame_iteratorFunction · 0.85
fFunction · 0.50

Tested by

no test coverage detected