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

Method module_offset

crates/wasmtime/src/runtime/trap.rs:614–616  ·  view source on GitHub ↗

Returns the offset within the original wasm module this frame's program counter was at. The offset here is the offset from the beginning of the original wasm module to the instruction that this frame points to. Note that `None` may be returned if the original module was not compiled with mapping information to yield this information. This is controlled by the [`Config::generate_address_map`](cra

(&self)

Source from the content-addressed store, hash-verified

612 /// [`Config::generate_address_map`](crate::Config::generate_address_map)
613 /// configuration option.
614 pub fn module_offset(&self) -> Option<usize> {
615 Some(self.instr?.file_offset()? as usize)
616 }
617
618 /// Returns the offset from the original wasm module's function to this
619 /// frame's program counter.

Callers 1

fmtMethod · 0.45

Calls 1

file_offsetMethod · 0.80

Tested by

no test coverage detected