Browse Source
Now that logic only affects ebreak instructions, and does not affect triggers that also cause a trap to be taken. Fixes #725. Although like Paul, I don't have a test for this case. Introduce trap_debug_mode so so ebreak instructions can force entry into debug mode.pull/1009/head
committed by
GitHub
5 changed files with 25 additions and 10 deletions
@ -1,2 +1,9 @@ |
|||
require_extension('C'); |
|||
throw trap_breakpoint(STATE.v, pc); |
|||
if (!STATE.debug_mode && |
|||
((STATE.prv == PRV_M && STATE.dcsr->ebreakm) || |
|||
(STATE.prv == PRV_S && STATE.dcsr->ebreaks) || |
|||
(STATE.prv == PRV_U && STATE.dcsr->ebreaku))) { |
|||
throw trap_debug_mode(); |
|||
} else { |
|||
throw trap_breakpoint(STATE.v, pc); |
|||
} |
|||
|
|||
@ -1 +1,8 @@ |
|||
throw trap_breakpoint(STATE.v, pc); |
|||
if (!STATE.debug_mode && |
|||
((STATE.prv == PRV_M && STATE.dcsr->ebreakm) || |
|||
(STATE.prv == PRV_S && STATE.dcsr->ebreaks) || |
|||
(STATE.prv == PRV_U && STATE.dcsr->ebreaku))) { |
|||
throw trap_debug_mode(); |
|||
} else { |
|||
throw trap_breakpoint(STATE.v, pc); |
|||
} |
|||
|
|||
Loading…
Reference in new issue