From 66e82a8d9d801188a285a2bb783b76433bc90f38 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 30 Dec 1999 16:36:39 +0000 Subject: when db_panic is set, ignore ddb errors that come through the kdb_trap() interface as well; assar@stacken.kth.se --- sys/arch/i386/i386/db_interface.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'sys/arch') diff --git a/sys/arch/i386/i386/db_interface.c b/sys/arch/i386/i386/db_interface.c index bda0b084dda..978d0a064dc 100644 --- a/sys/arch/i386/i386/db_interface.c +++ b/sys/arch/i386/i386/db_interface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_interface.c,v 1.6 1996/05/07 07:21:34 deraadt Exp $ */ +/* $OpenBSD: db_interface.c,v 1.7 1999/12/30 16:36:38 deraadt Exp $ */ /* $NetBSD: db_interface.c,v 1.22 1996/05/03 19:42:00 christos Exp $ */ /* @@ -48,7 +48,7 @@ #include #include #include - +#include extern label_t *db_recover; extern char *trap_type[]; @@ -83,17 +83,16 @@ kdb_trap(type, code, regs) { int s; -#if 0 - if ((boothowto&RB_KDB) == 0) - return(0); -#endif - switch (type) { case T_BPTFLT: /* breakpoint */ case T_TRCTRAP: /* single_step */ + case T_NMI: /* NMI */ case -1: /* keyboard interrupt */ break; default: + if (!db_panic) + return (0); + kdbprinttrap(type, code); if (db_recover != 0) { db_error("Faulted in DDB; continuing...\n"); -- cgit v1.2.3