Skip to content

Commit

Permalink
triggers: icount: not to decrease on firing icount trigger with Debug…
Browse files Browse the repository at this point in the history
… Mode action

The icount decreases on firing beakpoint action but not on entering Debug Mode action.
Reference: riscv/riscv-debug-spec#842
  • Loading branch information
YenHaoChen authored and Howard Yen-Hao Chen committed Jun 23, 2023
1 parent 7e82fd7 commit e7505b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion riscv/triggers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ std::optional<match_result_t> icount_t::detect_icount_match(processor_t * const
ret = match_result_t(TIMING_BEFORE, action);
}

if (count >= 1) {
if (count >= 1 && (ret == std::nullopt || action != MCONTROL_ACTION_DEBUG_MODE)) {
if (count == 1)
pending = 1;
count = count - 1;
Expand Down

0 comments on commit e7505b3

Please sign in to comment.