From: Mike Frysinger Date: Sat, 29 May 2021 19:22:17 +0000 (-0400) Subject: sim: mn10300: add SIGTRAP fallback X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fc23e71a17c38150bfad9e520f81f839fc2df4d8;p=binutils-gdb.git 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. --- diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index dbb5b6d5ac7..1f5753feaaf 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,3 +1,7 @@ +2021-05-29 Mike Frysinger + + * interp.c [!SIGTRAP] (SIGTRAP): Define to 5. + 2021-05-17 Mike Frysinger * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete. diff --git a/sim/mn10300/interp.c b/sim/mn10300/interp.c index b6c5d5b087e..541d4b14668 100644 --- a/sim/mn10300/interp.c +++ b/sim/mn10300/interp.c @@ -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);