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

Method address_map

crates/wasmtime/src/runtime/module.rs:1074–1079  ·  view source on GitHub ↗

Get the map from `.text` section offsets to Wasm binary offsets for this module. Each entry is a (`.text` section offset, Wasm binary offset) pair. Entries are yielded in order of `.text` section offset. Some entries are missing a Wasm binary offset. This is for code that is not associated with any single location in the Wasm binary, or for when source information was optimized away. Not every

(&'a self)

Source from the content-addressed store, hash-verified

1072 /// ]
1073 /// ```
1074 pub fn address_map<'a>(&'a self) -> Option<impl Iterator<Item = (usize, Option<u32>)> + 'a> {
1075 Some(
1076 wasmtime_environ::iterate_address_map(self.engine_code().address_map_data())?
1077 .map(|(offset, file_pos)| (offset as usize, file_pos.file_offset())),
1078 )
1079 }
1080
1081 /// Get this module's code object's `.text` section, containing its compiled
1082 /// executable code.

Callers 2

executeMethod · 0.45
annotate_asmFunction · 0.45

Calls 5

iterate_address_mapFunction · 0.85
file_offsetMethod · 0.80
mapMethod · 0.45
address_map_dataMethod · 0.45
engine_codeMethod · 0.45

Tested by

no test coverage detected