Browse Source

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>
pull/1275/head
Jerry Zhao 3 years ago
committed by GitHub
parent
commit
5f4cabc71e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      riscv/interactive.cc

2
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;
}

Loading…
Cancel
Save