Hello,
We need some clarification on the settings for DCSR[cause] in the case debugger is single stepping and hits upon an
ebreak, and
DCSR[ebreak*] is set to force entry into debug mode.
The DCSR[cause] priorities are listed (high->low) as
- single step
- debugger requested
- ebreak with DCSR[ebreak*] set
- trigger with action=enter-debug-mode
There is a similar case of stepping onto triggers with
action=enter-debug-mode, and the specification has an exception noted "
If executing or fetching the instruction causes a trigger to fire, Debug Mode is re-entered immediately after that trigger has fired. In that case cause is set to 2 (trigger) instead of 4 (single step)".
Should a similar exception apply to the ebreak case, and the DCSR[cause] indicate ebreak and not single step ?
If the debugger, on a single step, does hit upon a trigger or ebreak that would take it back to debug mode, it must be able to infer the cause as not single step and take appropriate action (increment DPC etc) prior to resume. Else it would hit the same trigger (if pre-execute) or ebreak again on resume.
Please advise.
Thanks
Ajay