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

Function debugger

crates/debugger/src/host/api.rs:178–186  ·  view source on GitHub ↗

Get the `OpaqueDebugger` or raise an error.

(
    table: &'a mut ResourceTable,
    debuggee: &Resource<Debuggee>,
)

Source from the content-addressed store, hash-verified

176
177/// Get the `OpaqueDebugger` or raise an error.
178fn debugger<'a>(
179 table: &'a mut ResourceTable,
180 debuggee: &Resource<Debuggee>,
181) -> Result<&'a mut dyn OpaqueDebugger> {
182 let d = table.get_mut(&debuggee)?.inner.as_mut().ok_or_else(|| {
183 wasmtime::error::format_err!("Attempt to use debuggee API while a future is pending")
184 })?;
185 Ok(&mut **d)
186}
187
188impl wit::HostDebuggee for ResourceTable {
189 async fn all_modules(&mut self, debuggee: Resource<Debuggee>) -> Result<Vec<Resource<Module>>> {

Callers 15

all_modulesMethod · 0.85
all_instancesMethod · 0.85
exit_framesMethod · 0.85
get_moduleMethod · 0.85
get_memoryMethod · 0.85
get_globalMethod · 0.85
get_tableMethod · 0.85
get_funcMethod · 0.85
get_tagMethod · 0.85
add_breakpointMethod · 0.85
remove_breakpointMethod · 0.85
size_bytesMethod · 0.85

Calls 3

OkFunction · 0.85
as_mutMethod · 0.45
get_mutMethod · 0.45

Tested by

no test coverage detected