sim: mn10300: add SIGTRAP fallback

This is a bit of a hack, but it matches the hack we use in other
places in the sim currently.  This fixes building for e.g. Windows.
The signal fallback logic needs a bit of love in general at some
point across all sim code.
This commit is contained in:
Mike Frysinger
2021-05-29 15:22:17 -04:00
parent b25370aa9f
commit fc23e71a17
2 changed files with 7 additions and 0 deletions

View File

@@ -464,6 +464,9 @@ mn10300_cpu_exception_resume(SIM_DESC sd, sim_cpu* cpu, int exception)
if(exception == 0 && State.exc_suspended > 0)
{
#ifndef SIGTRAP
# define SIGTRAP 5
#endif
if(State.exc_suspended != SIGTRAP) /* warn not for breakpoints */
sim_io_eprintf(sd, "Warning, resuming but ignoring pending exception signal (%d)\n",
State.exc_suspended);