Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/i386 Set si_code for T_PROTFLT|T_USER. Pointed...



details:   https://anonhg.NetBSD.org/src/rev/18ab481007b3
branches:  trunk
changeset: 551842:18ab481007b3
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Sep 12 23:20:26 2003 +0000

description:
Set si_code for T_PROTFLT|T_USER. Pointed out by enamicode.

diffstat:

 sys/arch/i386/i386/trap.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r f00bce6a7f4c -r 18ab481007b3 sys/arch/i386/i386/trap.c
--- a/sys/arch/i386/i386/trap.c Fri Sep 12 22:36:38 2003 +0000
+++ b/sys/arch/i386/i386/trap.c Fri Sep 12 23:20:26 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.186 2003/09/06 22:08:15 christos Exp $      */
+/*     $NetBSD: trap.c,v 1.187 2003/09/12 23:20:26 christos Exp $      */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.186 2003/09/06 22:08:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.187 2003/09/12 23:20:26 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -410,6 +410,7 @@
                ksi.ksi_trap = type & ~T_USER;
                ksi.ksi_addr = (void *)rcr2();
                switch (type) {
+               case T_PROTFLT|T_USER:
                case T_SEGNPFLT|T_USER:
                case T_STKFLT|T_USER:
                        ksi.ksi_code = BUS_ADRERR;
@@ -422,7 +423,7 @@
                        ksi.ksi_code = BUS_ADRALN;
                        break;
                default:
-                       ksi.ksi_code = 0;
+                       KASSERT(1);
                        break;
                }
                goto trapsignal;



Home | Main Index | Thread Index | Old Index