Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/alpha/alpha When creating a SIGFPE siginfo for a ge...



details:   https://anonhg.NetBSD.org/src/rev/6dc396d1dd90
branches:  trunk
changeset: 329239:6dc396d1dd90
user:      martin <martin%NetBSD.org@localhost>
date:      Fri May 16 06:11:21 2014 +0000

description:
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.

diffstat:

 sys/arch/alpha/alpha/trap.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 8c8d223020d3 -r 6dc396d1dd90 sys/arch/alpha/alpha/trap.c
--- a/sys/arch/alpha/alpha/trap.c       Fri May 16 00:48:41 2014 +0000
+++ b/sys/arch/alpha/alpha/trap.c       Fri May 16 06:11:21 2014 +0000
@@ -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 @@
                        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 */



Home | Main Index | Thread Index | Old Index