aboutsummaryrefslogtreecommitdiff
path: root/riscv/interactive.cc
diff options
context:
space:
mode:
authorLuís Marques <luismarques@lowrisc.org>2019-10-22 18:04:39 +0100
committerAndrew Waterman <andrew@sifive.com>2019-10-22 10:04:39 -0700
commit66bf6ffa87154b002475e48bc3e3b7ba14060efc (patch)
treebac0e372570b87ddef2e8f1e0a4195cebc9588cb /riscv/interactive.cc
parent26026529e0096925698cd9885f973713be796b1e (diff)
downloadspike-66bf6ffa87154b002475e48bc3e3b7ba14060efc.zip
spike-66bf6ffa87154b002475e48bc3e3b7ba14060efc.tar.gz
spike-66bf6ffa87154b002475e48bc3e3b7ba14060efc.tar.bz2
Catch polymorphic exceptions by reference (#352)
Diffstat (limited to 'riscv/interactive.cc')
-rw-r--r--riscv/interactive.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/riscv/interactive.cc b/riscv/interactive.cc
index 40c53bf..405bf35 100644
--- a/riscv/interactive.cc
+++ b/riscv/interactive.cc
@@ -108,7 +108,7 @@ void sim_t::interactive()
else
fprintf(stderr, "Unknown command %s\n", cmd.c_str());
}
- catch(trap_t t) {}
+ catch(trap_t& t) {}
}
ctrlc_pressed = false;
}
@@ -411,7 +411,7 @@ void sim_t::interactive_until(const std::string& cmd, const std::vector<std::str
if (ctrlc_pressed)
break;
}
- catch (trap_t t) {}
+ catch (trap_t& t) {}
set_procs_debug(noisy);
step(1);