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

Method debug_export

crates/wasmtime/src/runtime/debug.rs:336–352  ·  view source on GitHub ↗
(&self, store: &mut StoreOpaque, index: EntityIndex)

Source from the content-addressed store, hash-verified

334 }
335
336 fn debug_export(&self, store: &mut StoreOpaque, index: EntityIndex) -> Option<Extern> {
337 if !store.engine().tunables().debug_guest {
338 return None;
339 }
340
341 let env_module = self._module(store).env_module();
342 if !env_module.is_valid(index) {
343 return None;
344 }
345 let store_id = store.id();
346 let (instance, registry) = store.instance_and_module_registry_mut(self.id());
347 // SAFETY: the `store` and `registry` are associated with
348 // this instance as we fetched the instance directly from
349 // the store above.
350 let export = unsafe { instance.get_export_by_index_mut(registry, store_id, index) };
351 Some(Extern::from_wasmtime_export(export, store.engine()))
352 }
353}
354
355impl<'a, T> StoreContext<'a, T> {

Callers 6

debug_globalMethod · 0.80
debug_memoryMethod · 0.80
debug_shared_memoryMethod · 0.80
debug_tableMethod · 0.80
debug_functionMethod · 0.80
debug_tagMethod · 0.80

Calls 8

_moduleMethod · 0.80
tunablesMethod · 0.45
engineMethod · 0.45
env_moduleMethod · 0.45
is_validMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected