]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: mn10300: add SIGTRAP fallback
authorMike Frysinger <vapier@gentoo.org>
Sat, 29 May 2021 19:22:17 +0000 (15:22 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sat, 29 May 2021 19:32:00 +0000 (15:32 -0400)
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.

sim/mn10300/ChangeLog
sim/mn10300/interp.c

index dbb5b6d5ac7eb31db447cae0fa7c1cb09cb6f91c..1f5753feaaf1f9735ea88f156ed0bc7723127ee0 100644 (file)
@@ -1,3 +1,7 @@
+2021-05-29  Mike Frysinger  <vapier@gentoo.org>
+
+       * interp.c [!SIGTRAP] (SIGTRAP): Define to 5.
+
 2021-05-17  Mike Frysinger  <vapier@gentoo.org>
 
        * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
index b6c5d5b087ef4c1537036611a8c5664e42e560b7..541d4b14668cc81cd76d11cd54263e23e2064a3a 100644 (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);