* compile.c: #include "wait.h".
(sim_resume, sleep insn): Check program exit status in r0.
This commit is contained in:
parent
1ef980b961
commit
4dfb4ffcd1
2 changed files with 7 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
Mon Mar 11 09:53:25 1996 Doug Evans <dje@charmed.cygnus.com>
|
||||
|
||||
* compile.c (sim_resume): Watch for calls to abort.
|
||||
* compile.c: #include "wait.h".
|
||||
(sim_resume, sleep insn): Check program exit status in r0.
|
||||
* run.c: #include <signal.h>.
|
||||
(main): Abort if program got SIGILL.
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <stdlib.h>
|
||||
#endif
|
||||
#include <sys/param.h>
|
||||
#include "wait.h"
|
||||
#include "ansidecl.h"
|
||||
#include "callback.h"
|
||||
#include "remote-sim.h"
|
||||
|
@ -1254,7 +1255,10 @@ sim_resume (step, siggnal)
|
|||
cpu.exception = SIGILL;
|
||||
goto end;
|
||||
case O (O_SLEEP, SB):
|
||||
if ((short) cpu.regs[0] == -255)
|
||||
/* The format of r0 is defined by devo/include/wait.h.
|
||||
cpu.exception handling needs some cleanup: we need to make the
|
||||
the handling of normal exits vs signals, etc. more sensible. */
|
||||
if (! WIFEXITED (cpu.regs[0]) && WIFSIGNALED (cpu.regs[0]))
|
||||
cpu.exception = SIGILL;
|
||||
else
|
||||
cpu.exception = SIGTRAP;
|
||||
|
|
Loading…
Reference in a new issue