aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--riscv/triggers.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/triggers.cc b/riscv/triggers.cc
index 1e3c2bb..824aa4a 100644
--- a/riscv/triggers.cc
+++ b/riscv/triggers.cc
@@ -233,7 +233,7 @@ bool etrigger_t::tdata1_write(processor_t * const proc, const reg_t val) noexcep
s = proc->extension_enabled('S') ? get_field(val, CSR_ETRIGGER_S) : 0;
u = proc->extension_enabled('U') ? get_field(val, CSR_ETRIGGER_U) : 0;
action = (action_t)get_field(val, CSR_ETRIGGER_ACTION);
- if (action > 4 || (action==1 && dmode==0))
+ if (action > 4 || (action==ACTION_DEBUG_MODE && dmode==0))
action = ACTION_DEBUG_EXCEPTION;
return true;
}