-/* $OpenBSD: machdep.c,v 1.15 1997/01/24 19:56:37 niklas Exp $ */
+/* $OpenBSD: machdep.c,v 1.16 1997/02/03 13:09:14 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.61 1996/12/07 01:54:49 cgd Exp $ */
/*
* Send an interrupt to process.
*/
void
-sendsig(catcher, sig, mask, code)
+sendsig(catcher, sig, mask, code, type, val)
sig_t catcher;
int sig, mask;
u_long code;
+ int type;
+ union sigval val;
{
struct proc *p = curproc;
struct sigcontext *scp, ksc;
-/* $OpenBSD: trap.c,v 1.6 1997/01/24 19:56:46 niklas Exp $ */
+/* $OpenBSD: trap.c,v 1.7 1997/02/03 13:09:16 deraadt Exp $ */
/* $NetBSD: trap.c,v 1.19 1996/11/27 01:28:30 cgd Exp $ */
/*
goto out;
ucode = a0; /* VA */
+ if (i == SIGBUS)
+ typ = BUS_ADRALN;
+ else
+ typ = SEGV_MAPERR;
break;
}
*/
if (user) {
sigfpe: i = SIGFPE;
- ucode = a0; /* exception summary */
+ vv = ucode = a0; /* exception summary */
+ typ = FPE_FLTINV; /* XXX? */
break;
}
case ALPHA_IF_CODE_BUGCHK:
ucode = a0; /* trap type */
i = SIGTRAP;
+ typ = TRAP_BRKPT;
break;
case ALPHA_IF_CODE_OPDEC:
}
#endif
i = SIGILL;
+ typ = ILL_ILLOPC;
break;
case ALPHA_IF_CODE_FEN:
}
ucode = a0;
i = SIGSEGV;
+ typ = SEGV_MAPERR;
break;
}
goto dopanic;
}
- trapsignal(p, i, ucode);
+ trapsignal(p, i, ucode, typ, ucode);
out:
if (user)
userret(p, framep->tf_regs[FRAME_PC], sticks);
* unaligned_{load,store}_* clears the signal flag.
*/
signal = SIGBUS;
+ typ = BUS_ADRALN;
if (dofix && size != 0) {
switch (opcode) {
#ifdef FIX_UNALIGNED_VAX_FP