Internal helper to patch a new module for single-stepping. When a module is newly registered in a `Store`, we need to patch all breakpoints into the copy for this `Store` if single-stepping is currently enabled.
(&self, code: &mut StoreCode, module: &Module)
| 1026 | /// `Store`, we need to patch all breakpoints into the copy for |
| 1027 | /// this `Store` if single-stepping is currently enabled. |
| 1028 | pub(crate) fn patch_new_module(&self, code: &mut StoreCode, module: &Module) -> Result<()> { |
| 1029 | // Apply single-step state if single-stepping is enabled. Note |
| 1030 | // that no other individual breakpoints will exist yet (as |
| 1031 | // this is a newly registered module). |
| 1032 | if self.single_step { |
| 1033 | let mem = code.code_memory_mut().unwrap(); |
| 1034 | mem.unpublish()?; |
| 1035 | BreakpointEdit::apply_single_step(mem, module, true, |_key| false)?; |
| 1036 | mem.publish()?; |
| 1037 | } |
| 1038 | Ok(()) |
| 1039 | } |
| 1040 | } |
| 1041 | |
| 1042 | impl<'a> BreakpointEdit<'a> { |