When creating a SIGFPE siginfo for a gentrap, we have no additional info
(ucode) available, and the pal interface does not provide additional details either. Hardcode the si_code value to FPE_INTDIV, since the only callers of gentrap in our kernel seem to be the division routines in libkern.
This commit is contained in:
parent
d67ab12c1d
commit
bb4ae2c566
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: trap.c,v 1.130 2014/03/20 20:51:40 christos Exp $ */
|
||||
/* $NetBSD: trap.c,v 1.131 2014/05/16 06:11:21 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
|
||||
@ -93,7 +93,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.130 2014/03/20 20:51:40 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.131 2014/05/16 06:11:21 martin Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -323,7 +323,7 @@ trap(const u_long a0, const u_long a1, const u_long a2, const u_long entry,
|
||||
if (framep->tf_regs[FRAME_A0] == -2) { /* weird! */
|
||||
KSI_INIT_TRAP(&ksi);
|
||||
ksi.ksi_signo = SIGFPE;
|
||||
ksi.ksi_code = alpha_ucode_to_ksiginfo(ucode);
|
||||
ksi.ksi_code = FPE_INTDIV;
|
||||
ksi.ksi_addr =
|
||||
(void *)l->l_md.md_tf->tf_regs[FRAME_PC];
|
||||
ksi.ksi_trap = a0; /* exception summary */
|
||||
|
Loading…
Reference in New Issue
Block a user