From 0ca74ba0d86887d3bd7ce11dc078286d683a12f1 Mon Sep 17 00:00:00 2001 From: eeh Date: Thu, 28 Sep 2000 18:54:39 +0000 Subject: [PATCH] Fix the `trap type 0x10' problem. Apparently, something has changed and now makes use of lockmgr(). Since we broke into the debugger from an interrupt, we don't have a curproc, so when lockmgr() tries to find our PID it barfs, causing another break into DDB which then calls the mysterious code that calls lockmgr() again..... So set doing_shutdown while we're in DDB so lockmgr ignores locks. --- sys/arch/sparc64/sparc64/db_interface.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/arch/sparc64/sparc64/db_interface.c b/sys/arch/sparc64/sparc64/db_interface.c index f974de3b21e5..c0fced528e6d 100644 --- a/sys/arch/sparc64/sparc64/db_interface.c +++ b/sys/arch/sparc64/sparc64/db_interface.c @@ -1,4 +1,4 @@ -/* $NetBSD: db_interface.c,v 1.43 2000/09/28 15:32:36 eeh Exp $ */ +/* $NetBSD: db_interface.c,v 1.44 2000/09/28 18:54:39 eeh Exp $ */ /* * Mach Operating System @@ -174,8 +174,10 @@ kdb_trap(type, tf) extern int savetstate(struct trapstate *ts); extern void restoretstate(int tl, struct trapstate *ts); extern int trap_trace_dis; + extern int doing_shutdown; trap_trace_dis++; + doing_shutdown++; #if NFB > 0 fb_unblank(); #endif @@ -248,6 +250,7 @@ kdb_trap(type, tf) #endif *tf = ddb_regs.ddb_tf; trap_trace_dis--; + doing_shutdown--; return (1); }