aboutsummaryrefslogtreecommitdiff
path: root/sim/mn10300
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-05-29 15:22:17 -0400
committerMike Frysinger <vapier@gentoo.org>2021-05-29 15:32:00 -0400
commitfc23e71a17c38150bfad9e520f81f839fc2df4d8 (patch)
treed2b798bf7961fa0cf182994f3c5f77404aa2537c /sim/mn10300
parentb25370aa9f3e7dd8fe53300b35d2a5ecdd3e48b9 (diff)
downloadgdb-fc23e71a17c38150bfad9e520f81f839fc2df4d8.zip
gdb-fc23e71a17c38150bfad9e520f81f839fc2df4d8.tar.gz
gdb-fc23e71a17c38150bfad9e520f81f839fc2df4d8.tar.bz2
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.
Diffstat (limited to 'sim/mn10300')
-rw-r--r--sim/mn10300/ChangeLog4
-rw-r--r--sim/mn10300/interp.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog
index dbb5b6d..1f5753f 100644
--- a/sim/mn10300/ChangeLog
+++ b/sim/mn10300/ChangeLog
@@ -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.
diff --git a/sim/mn10300/interp.c b/sim/mn10300/interp.c
index b6c5d5b..541d4b1 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);