diff options
author | Jerry Zhao <jerryz123@berkeley.edu> | 2023-03-07 19:15:31 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-07 19:15:31 -0800 |
commit | 5f4cabc71e2323cf4c38339cbc3504e4d7a7de87 (patch) | |
tree | f87c17d5d6a31a4393bde2208a617d086d20f300 | |
parent | c97fb920b2678a01bee7dbaeb733b105d55e5252 (diff) | |
download | riscv-isa-sim-5f4cabc71e2323cf4c38339cbc3504e4d7a7de87.zip riscv-isa-sim-5f4cabc71e2323cf4c38339cbc3504e4d7a7de87.tar.gz riscv-isa-sim-5f4cabc71e2323cf4c38339cbc3504e4d7a7de87.tar.bz2 |
Fix ctrl-c responsiveness when running-silent in interactive mode
Break out of the interactive_run->interactive_run loop when ctrlc_pressed
Signed-off-by: Jerry Zhao <jerryz123@berkeley.edu>
-rw-r--r-- | riscv/interactive.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/interactive.cc b/riscv/interactive.cc index e0db1c9..8ad7592 100644 --- a/riscv/interactive.cc +++ b/riscv/interactive.cc @@ -407,7 +407,7 @@ void sim_t::interactive_run(const std::string& cmd, const std::vector<std::strin for (size_t i = 0; i < actual_steps && !ctrlc_pressed && !done(); i++) step(1); - if (actual_steps < steps) { + if (actual_steps < steps && !ctrlc_pressed) { next_interactive_action = [=](){ interactive_run(cmd, {std::to_string(steps - actual_steps)}, noisy); }; return; } |