From 7e31f495358df52e49b9a5fec7ce273d706b1300 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Thu, 15 Dec 2016 21:12:34 -0800 Subject: [PATCH] Fix single stepping over faulting instructions. (#80) --- riscv/execute.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/riscv/execute.cc b/riscv/execute.cc index 36e7896..eb9fe4b 100644 --- a/riscv/execute.cc +++ b/riscv/execute.cc @@ -190,6 +190,11 @@ miss: { take_trap(t, pc); n = instret; + + if (unlikely(state.single_step == state.STEP_STEPPED)) { + state.single_step = state.STEP_NONE; + enter_debug_mode(DCSR_CAUSE_STEP); + } } catch (trigger_matched_t& t) { -- 2.30.2