Add one breakpoint patch.
(
&mut self,
wasm_pc: ModulePC,
patch_start_native_pc: u32,
patch: &[u8],
)
| 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. |