riscv/riscv-debug-spec

Behavior of triggers with action>1 on instructions that trap

pdonahue-ventana opened this issue · 0 comments

riscv-non-isa/riscv-trace-spec#60 raises a good question about how triggers that do not trap/halt behave when executing an instruction that traps/halts for a different reason.

My assumption is that table 5.2 of the debug spec also applies to actions that do not trap or halt. For instance, "mcontrol/mcontrol6 execute address before" with one of the trace actions (2-5) would happen even in the presence of any of the exceptions listed below it (including instruction page faults or access faults). If a trigger was "mcontrol/mcontrol6 execute data before" then it would not happen in the presence of a page fault or access fault (since no instruction was fetched so no comparison can occur) but would still happen if it was an illegal instruction, ecall, ebreak that either traps or halts (depending on dcsr), etc. That should be clearer.

/cc @zhonghochen