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

Method frame_stack

crates/debugger/src/host/opaque.rs:528–543  ·  view source on GitHub ↗
(&mut self, frame: FrameHandle)

Source from the content-addressed store, hash-verified

526 }
527
528 async fn frame_stack(&mut self, frame: FrameHandle) -> Result<Vec<WasmValue>> {
529 self.with_store(move |mut store| -> Result<Vec<WasmValue>> {
530 let n_stacks = frame
531 .num_stacks(&mut store)
532 .map_err(|_| wit::Error::InvalidFrame)?;
533 let mut result = vec![];
534 for i in 0..n_stacks {
535 let val = frame
536 .stack(&mut store, i)
537 .expect("checked for validity above");
538 result.push(WasmValue::new(&mut store, val)?);
539 }
540 Ok(result)
541 })
542 .await?
543 }
544
545 async fn frame_parent(&mut self, frame: FrameHandle) -> Result<Option<FrameHandle>> {
546 self.with_store(move |mut store| -> Result<Option<FrameHandle>> {

Callers 1

get_stackMethod · 0.80

Calls 7

OkFunction · 0.85
with_storeMethod · 0.80
num_stacksMethod · 0.80
newFunction · 0.50
expectMethod · 0.45
stackMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected