diff --git a/riscv/triggers.cc b/riscv/triggers.cc index 9eac9684e..5090ddc5f 100644 --- a/riscv/triggers.cc +++ b/riscv/triggers.cc @@ -112,6 +112,12 @@ bool trigger_t::textra_match(processor_t * const proc) const noexcept bool trigger_t::allow_action(const state_t * const state) const { + /* This implements option 1 from Section 5.4 in the Debug Spec. Since we + * already implement option 2 (tcontrol), it's disabled for now. Some day when + * there's a mechanism to tell spike which option to use, we can use this code + * again. */ + + /* if (get_action() == ACTION_DEBUG_EXCEPTION) { const bool mstatus_mie = state->mstatus->read() & MSTATUS_MIE; const bool sstatus_sie = state->sstatus->read() & MSTATUS_SIE; @@ -122,6 +128,7 @@ bool trigger_t::allow_action(const state_t * const state) const (state->prv != PRV_S || state->v || !medeleg_breakpoint || sstatus_sie) && (state->prv != PRV_S || !state->v || !medeleg_breakpoint || !hedeleg_breakpoint || vsstatus_sie); } + */ return true; }