Don't turn off the trace flag here; let sendsig() do it.

If in Linux emulation, send SIGSEGV for protection faults, rather than SIGBUS.
This commit is contained in:
mycroft 1996-04-15 00:20:32 +00:00
parent be19763acb
commit e0afa4e4f9

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.92 1996/01/08 13:51:38 mycroft Exp $ */
/* $NetBSD: trap.c,v 1.93 1996/04/15 00:20:32 mycroft Exp $ */
#undef DEBUG
#define DEBUG
@ -412,8 +412,11 @@ trap(frame)
map, va, ftype, rv);
goto we_re_toast;
}
trapsignal(p, (rv == KERN_PROTECTION_FAILURE)
? SIGBUS : SIGSEGV, T_PAGEFLT);
trapsignal(p, (rv == KERN_PROTECTION_FAILURE
#ifdef COMPAT_LINUX
&& p->p_emul != &emul_linux_aout && p->p_emul != &emul_linux_elf
#endif
) ? SIGBUS : SIGSEGV, T_PAGEFLT);
break;
}
@ -427,7 +430,6 @@ trap(frame)
case T_BPTFLT|T_USER: /* bpt instruction fault */
case T_TRCTRAP|T_USER: /* trace trap */
trace:
frame.tf_eflags &= ~PSL_T;
trapsignal(p, SIGTRAP, type &~ T_USER);
break;