From 388753f9412d95d83d909b1f0447b8b0ad1ffd6b Mon Sep 17 00:00:00 2001 From: YenHaoChen <39526191+YenHaoChen@users.noreply.github.com> Date: Wed, 26 Oct 2022 08:36:48 +0800 Subject: Use ACTION_DEBUG_MODE instead of 1 Signed-off-by: YenHaoChen <39526191+YenHaoChen@users.noreply.github.com> --- riscv/triggers.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.1