diff options
Diffstat (limited to 'riscv/processor.cc')
-rw-r--r-- | riscv/processor.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/riscv/processor.cc b/riscv/processor.cc index 1c53986..4537c18 100644 --- a/riscv/processor.cc +++ b/riscv/processor.cc @@ -126,9 +126,10 @@ void processor_t::set_debug(bool value) ext->set_debug(value); } -void processor_t::set_halted(bool value) +void processor_t::set_halted(bool value, halt_reason_t reason) { halted = value; + halt_reason = reason; } void processor_t::set_single_step(bool value) @@ -210,7 +211,7 @@ void processor_t::take_trap(trap_t& t, reg_t epc) if (t.cause() == CAUSE_BREAKPOINT) { // TODO: Only do this if there is a debugger attached. - halted = true; + set_halted(true, HR_SWBP); return; } |