do not crash on fault in debugger

This commit is contained in:
folkert van heusden 2024-04-12 21:20:23 +02:00
parent 3886e216f0
commit 77a12c0fa1
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1

View file

@ -138,6 +138,7 @@ void console_ncurses::panel_update_thread()
myusleep(1000000 / refresh_rate);
// note that these are approximately as there's no mutex on the emulation
try {
uint16_t current_PSW = c->getPSW();
int run_mode = current_PSW >> 14;
@ -205,6 +206,12 @@ void console_ncurses::panel_update_thread()
mvwprintw(w_panel->win, 3, 46, "%s - %s",
instruction.c_str(),
work_values.c_str());
}
catch(int trap) {
std::unique_lock<std::mutex> lck(ncurses_mutex);
werase(w_panel->win);
}
// speed
uint64_t cur_instr_cnt = c->get_instructions_executed_count();