From 9222f6514490290e0f1d461b7fe22c2b552ee733 Mon Sep 17 00:00:00 2001 From: jsg Date: Sun, 16 Apr 2023 06:43:49 +0000 Subject: [PATCH] call default db_ktrap() with tf_err, not 0 for exception error code ok guenther@ --- sys/arch/amd64/amd64/trap.c | 4 ++-- sys/arch/i386/i386/trap.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/arch/amd64/amd64/trap.c b/sys/arch/amd64/amd64/trap.c index 8c9abf64bd7..6069cf3b6aa 100644 --- a/sys/arch/amd64/amd64/trap.c +++ b/sys/arch/amd64/amd64/trap.c @@ -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); diff --git a/sys/arch/i386/i386/trap.c b/sys/arch/i386/i386/trap.c index 9db41060c2f..8208c89ffcb 100644 --- a/sys/arch/i386/i386/trap.c +++ b/sys/arch/i386/i386/trap.c @@ -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) -- 2.20.1