call default db_ktrap() with tf_err, not 0 for exception error code
authorjsg <jsg@openbsd.org>
Sun, 16 Apr 2023 06:43:49 +0000 (06:43 +0000)
committerjsg <jsg@openbsd.org>
Sun, 16 Apr 2023 06:43:49 +0000 (06:43 +0000)
ok guenther@

sys/arch/amd64/amd64/trap.c
sys/arch/i386/i386/trap.c

index 8c9abf6..6069cf3 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: trap.c,v 1.99 2023/04/16 06:38:50 guenther Exp $      */
+/*     $OpenBSD: trap.c,v 1.100 2023/04/16 06:43:49 jsg Exp $  */
 /*     $NetBSD: trap.c,v 1.2 2003/05/04 23:51:56 fvdl Exp $    */
 
 /*-
@@ -329,7 +329,7 @@ kerntrap(struct trapframe *frame)
        default:
        we_re_toast:
 #ifdef DDB
-               if (db_ktrap(type, 0, frame))
+               if (db_ktrap(type, frame->tf_err, frame))
                        return;
 #endif
                trap_print(frame, type);
index 9db4106..8208c89 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: trap.c,v 1.161 2023/03/08 04:43:07 guenther Exp $     */
+/*     $OpenBSD: trap.c,v 1.162 2023/04/16 06:43:49 jsg Exp $  */
 /*     $NetBSD: trap.c,v 1.95 1996/05/05 06:50:02 mycroft Exp $        */
 
 /*-
@@ -463,7 +463,7 @@ trap(struct trapframe *frame)
        default:
        we_re_toast:
 #ifdef DDB
-               if (db_ktrap(type, 0, frame))
+               if (db_ktrap(type, frame->tf_err, frame))
                        return;
 #endif
                if (frame->tf_trapno < trap_types)