You copied the Doc URL to your clipboard.
Shared Debug.Softwarestep Pseudocode
Library pseudocode for shared/debug/softwarestep/CheckSoftwareStep
// Take a Software Step exception if in the active-pending state
// Other self-hosted debug functions will call AArch32.GenerateDebugExceptions() if called from
// AArch32 state. However, because Software Step is only active when the debug target Exception
// level is using AArch64, CheckSoftwareStep only calls AArch64.GenerateDebugExceptions().
if !ELUsingAArch32(DebugTarget()) && AArch64.GenerateDebugExceptions() then
if MDSCR_EL1.SS == '1' && PSTATE.SS == '0' then
Library pseudocode for shared/debug/softwarestep/SSAdvance
// Advance the Software Step state machine.
// A simpler implementation of this function just clears PSTATE.SS to zero regardless of the
// current Software Step state machine. However, this check is made to illustrate that the
// processor only needs to consider advancing the state machine from the active-not-pending
target = DebugTarget();
step_enabled = !ELUsingAArch32(target) && MDSCR_EL1.SS == '1';
active_not_pending = step_enabled && PSTATE.SS == '1';
if active_not_pending then PSTATE.SS = '0';
Library pseudocode for shared/debug/softwarestep/SoftwareStep_DidNotStep
// Returns TRUE if the previously executed instruction was executed in the inactive state, that is,
// if it was not itself stepped.
Library pseudocode for shared/debug/softwarestep/SoftwareStep_SteppedEX
// Returns TRUE if the previously executed instruction was a Load-Exclusive class instruction
// executed in the active-not-pending state.