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

Method add_breakpoint_patch

crates/environ/src/compile/frame_table.rs:317–331  ·  view source on GitHub ↗

Add one breakpoint patch.

(
        &mut self,
        wasm_pc: ModulePC,
        patch_start_native_pc: u32,
        patch: &[u8],
    )

Source from the content-addressed store, hash-verified

315
316 /// Add one breakpoint patch.
317 pub fn add_breakpoint_patch(
318 &mut self,
319 wasm_pc: ModulePC,
320 patch_start_native_pc: u32,
321 patch: &[u8],
322 ) {
323 self.breakpoint_pcs
324 .push(U32::new(LittleEndian, wasm_pc.raw()));
325 self.breakpoint_patch_offsets
326 .push(U32::new(LittleEndian, patch_start_native_pc));
327 self.breakpoint_patch_data.extend(patch.iter().cloned());
328 let end = u32::try_from(self.breakpoint_patch_data.len()).unwrap();
329 self.breakpoint_patch_data_ends
330 .push(U32::new(LittleEndian, end));
331 }
332
333 /// Serialize the framd-table data section, taking a closure to
334 /// consume slices.

Callers 1

append_codeMethod · 0.80

Calls 7

newFunction · 0.50
pushMethod · 0.45
rawMethod · 0.45
extendMethod · 0.45
iterMethod · 0.45
unwrapMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected