(
patches: impl Iterator<Item = FrameTableBreakpointData<'b>> + 'b,
mem: &mut CodeMemory,
enable: bool,
)
| 1060 | } |
| 1061 | |
| 1062 | fn patch<'b>( |
| 1063 | patches: impl Iterator<Item = FrameTableBreakpointData<'b>> + 'b, |
| 1064 | mem: &mut CodeMemory, |
| 1065 | enable: bool, |
| 1066 | ) { |
| 1067 | let mem = mem.text_mut(); |
| 1068 | for patch in patches { |
| 1069 | let data = if enable { patch.enable } else { patch.disable }; |
| 1070 | let mem = &mut mem[patch.offset..patch.offset + data.len()]; |
| 1071 | log::trace!( |
| 1072 | "patch: offset 0x{:x} with enable={enable}: data {data:?} replacing {mem:?}", |
| 1073 | patch.offset |
| 1074 | ); |
| 1075 | mem.copy_from_slice(data); |
| 1076 | } |
| 1077 | } |
| 1078 | |
| 1079 | /// Add a breakpoint in the given module at the given PC in that |
| 1080 | /// module. |
nothing calls this directly
no test coverage detected