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

Function wasmtime_frame_module_name

crates/c-api/src/trap.rs:210–222  ·  view source on GitHub ↗
(
    frame: &'a wasm_frame_t<'_>,
)

Source from the content-addressed store, hash-verified

208
209#[unsafe(no_mangle)]
210pub extern "C" fn wasmtime_frame_module_name<'a>(
211 frame: &'a wasm_frame_t<'_>,
212) -> Option<&'a wasm_name_t> {
213 frame
214 .module_name
215 .get_or_init(|| {
216 frame.trace.frames()[frame.idx]
217 .module()
218 .name()
219 .map(|s| wasm_name_t::from(s.to_string().into_bytes()))
220 })
221 .as_ref()
222}
223
224#[unsafe(no_mangle)]
225pub extern "C" fn wasm_frame_func_offset(frame: &wasm_frame_t<'_>) -> usize {

Callers 1

module_nameMethod · 0.85

Calls 9

fromFunction · 0.85
into_bytesMethod · 0.80
as_refMethod · 0.45
get_or_initMethod · 0.45
mapMethod · 0.45
nameMethod · 0.45
moduleMethod · 0.45
framesMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected