The step packet (s) requests a single machine
instruction step. Its implementation is almost identical to that of
the continue (c) packet, but using the functions
rsp_step ()
and
rsp_step_generic ()
.
The sole difference is that the generic function sets, rather than clears the single stepping flag in Debug Mode Register 1. This ensures a TRAP exception is raised after the next instruction completes execution.
cpu_state.sprs[SPR_DRR] = 0; cpu_state.sprs[SPR_DMR2] &= ~SPR_DMR2_WGB; cpu_state.sprs[SPR_DMR1] |= SPR_DMR1_ST; cpu_state.sprs[SPR_DSR] |= SPR_DSR_TE;