* compile.c (sim_resume): Watch for calls to abort.
[deliverable/binutils-gdb.git] / sim / h8300 / run.c
index 97841269a7035708934f3fb78c1fb63383f34759..b7dd77cca4cd1b95cf428fe1c3c50cabfbaf86b7 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <varargs.h>
 #include <stdio.h>
+#include <signal.h>
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
@@ -45,6 +46,8 @@ main (ac, av)
   int verbose = 0;
   int trace = 0;
   char *name = "";
+  int sigrc;
+  enum sim_stop reason;
 
   while ((i = getopt (ac, av, "c:htv")) != EOF)
     switch (i) 
@@ -95,6 +98,11 @@ main (ac, av)
          sim_resume(0,0);
          if (verbose)
            sim_info (verbose - 1);
+         sim_stop_reason (&reason, &sigrc);
+         /* FIXME: this test is insufficient but we can't do much
+            about it until sim_stop_reason is cleaned up.  */
+         if (sigrc == SIGILL)
+           abort ();
          return 0;
        }
     }
This page took 0.023996 seconds and 4 git commands to generate.