From 6ec96a0265136f7077200a7d420031a0f2168964 Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Tue, 31 Dec 1996 23:18:55 +0000 Subject: [PATCH] Deal with kill encoding the signal via the exit status. --- sim/v850/ChangeLog | 5 +++++ sim/v850/simops.c | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 3bf8dd8121f..b1545eb9b1e 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,3 +1,8 @@ +Tue Dec 31 18:11:13 1996 Michael Meissner + + * simops.c (OP_10007E0): Know that kill encodes the signal number + via: 0xdead0000 | signal and turn it back into a signal. + Fri Dec 27 14:44:06 1996 Michael Meissner * v850_sim.h (SIG_V850_EXIT): Define as -1. diff --git a/sim/v850/simops.c b/sim/v850/simops.c index 49fc6e58cbb..e044c46568e 100644 --- a/sim/v850/simops.c +++ b/sim/v850/simops.c @@ -2053,9 +2053,12 @@ OP_10007E0 () RETVAL = v850_callback->open (v850_callback, MEMPTR (PARM1), PARM2); break; case SYS_exit: - /* EXIT - caller can look in PARM1 to work out the - reason */ - State.exception = SIG_V850_EXIT; + if ((PARM1 & 0xffff0000) == 0xdead0000 && (PARM1 & 0xffff) != 0) + State.exception = PARM1 & 0xffff; /* get signal encoded by kill */ + else if (PARM1 == 0xdead) + State.exception = SIGABRT; /* old libraries */ + else + State.exception = SIG_V850_EXIT; /* PARM1 has exit status encoded */ break; case SYS_stat: /* added at hmsi */ -- 2.30.2