void sim_resume (SIM_DESC sd, int step, int sig_to_deliver) { check_desc (sd); if (sig_to_deliver != 0) { fprintf (stderr, "Warning: the rx minisim does not implement " "signal delivery yet.\n" "Resuming with no signal.\n"); } execution_error_clear_last_error (); if (step) handle_step (decode_opcode ()); else { /* We don't clear 'stop' here, because then we would miss interrupts that arrived on the way here. Instead, we clear the flag in sim_stop_reason, after GDB has disabled the interrupt signal handler. */ for (;;) { if (stop) { stop = 0; reason = sim_stopped; siggnal = TARGET_SIGNAL_INT; break; } int rc = decode_opcode (); if (execution_error_get_last_error () != SIM_ERR_NONE) { reason = sim_stopped; siggnal = TARGET_SIGNAL_SEGV; break; } if (!RX_STEPPED (rc)) { handle_step (rc); break; } } } }
void sim_resume (SIM_DESC sd, int step, int sig_to_deliver) { int rc; check_desc (sd); if (sig_to_deliver != 0) { fprintf (stderr, "Warning: the rl78 minisim does not implement " "signal delivery yet.\n" "Resuming with no signal.\n"); } /* We don't clear 'stop' here, because then we would miss interrupts that arrived on the way here. Instead, we clear the flag in sim_stop_reason, after GDB has disabled the interrupt signal handler. */ for (;;) { if (stop) { stop = 0; reason = sim_stopped; siggnal = GDB_SIGNAL_INT; break; } if (hw_breakpoints[pc >> 3] && (hw_breakpoints[pc >> 3] & (1 << (pc & 0x7)))) { reason = sim_stopped; siggnal = GDB_SIGNAL_TRAP; break; } rc = setjmp (decode_jmp_buf); if (rc == 0) rc = decode_opcode (); if (!RL78_STEPPED (rc) || step) { handle_step (rc); break; } } }