Module Name:    src
Committed By:   martin
Date:           Fri May 16 06:11:21 UTC 2014

Modified Files:
        src/sys/arch/alpha/alpha: trap.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/sys/arch/alpha/alpha/trap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/alpha/alpha/trap.c
diff -u src/sys/arch/alpha/alpha/trap.c:1.130 src/sys/arch/alpha/alpha/trap.c:1.131
--- src/sys/arch/alpha/alpha/trap.c:1.130	Thu Mar 20 20:51:40 2014
+++ src/sys/arch/alpha/alpha/trap.c	Fri May 16 06:11:21 2014
@@ -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, c
 			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 */

Reply via email to