-/* $OpenBSD: trap.c,v 1.10 1997/02/02 00:43:21 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.11 1997/02/04 02:49:24 deraadt Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
i = SIGILL;
ucode = frame.f_format; /* XXX was ILL_RESAD_FAULT */
typ = ILL_COPROC;
+ v = frame.f_pc;
break;
#ifdef FPCOPROC
typ = FPE_FLTRES;
ucode = code;
i = SIGFPE;
+ v = frame.f_pc;
break;
#endif
/* XXX need to FRESTORE */
typ = FPE_FLTINV;
i = SIGFPE;
+ v = frame.f_pc;
break;
#endif
ucode = frame.f_format; /* XXX was ILL_PRIVIN_FAULT */
typ = ILL_ILLOPC;
i = SIGILL;
+ v = frame.f_pc;
break;
+
case T_PRIVINST|T_USER: /* privileged instruction fault */
#ifdef COMPAT_HPUX
if (p->p_emul == &emul_hpux)
ucode = frame.f_format; /* XXX was ILL_PRIVIN_FAULT */
typ = ILL_PRVOPC;
i = SIGILL;
+ v = frame.f_pc;
break;
case T_ZERODIV|T_USER: /* Divide by zero */
ucode = frame.f_format; /* XXX was FPE_INTDIV_TRAP */
typ = FPE_INTDIV;
i = SIGFPE;
+ v = frame.f_pc;
break;
case T_CHKINST|T_USER: /* CHK instruction trap */
ucode = frame.f_format; /* XXX was FPE_SUBRNG_TRAP */
typ = FPE_FLTSUB;
i = SIGFPE;
+ v = frame.f_pc;
break;
case T_TRAPVINST|T_USER: /* TRAPV instruction trap */
}
#endif
ucode = frame.f_format; /* XXX was FPE_INTOVF_TRAP */
- typ = FPE_FLTOVF;
- i = SIGFPE;
+ typ = ILL_ILLTRP;
+ i = SIGILL;
+ v = frame.f_pc;
break;
/*