From 5805bbd00a60d59f63d1c80fdb1eec00a7aefc1d Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sun, 6 Nov 2005 17:58:21 +0000 Subject: Invoke regdump() on abort if compiled without DDB support. --- sys/arch/m88k/m88k/m88k_machdep.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/sys/arch/m88k/m88k/m88k_machdep.c b/sys/arch/m88k/m88k/m88k_machdep.c index 1b771ac0cb7..2b0db929c41 100644 --- a/sys/arch/m88k/m88k/m88k_machdep.c +++ b/sys/arch/m88k/m88k/m88k_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m88k_machdep.c,v 1.7 2005/10/13 19:48:33 miod Exp $ */ +/* $OpenBSD: m88k_machdep.c,v 1.8 2005/11/06 17:58:20 miod Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -62,7 +62,7 @@ #include -#if DDB +#ifdef DDB #include #include #include @@ -183,8 +183,10 @@ setrunqueue(p) struct proc *oldlast; int which = p->p_priority >> 2; +#ifdef DIAGNOSTIC if (p->p_back != NULL) panic("setrunqueue %p", p); +#endif q = &qs[which]; whichqs |= 1 << which; p->p_forw = (struct proc *)q; @@ -205,8 +207,10 @@ remrunqueue(vp) int which = p->p_priority >> 2; struct prochd *q; +#ifdef DIAGNOSTIC if ((whichqs & (1 << which)) == 0) panic("remrq %p", p); +#endif p->p_forw->p_back = p->p_back; p->p_back->p_forw = p->p_forw; p->p_back = NULL; @@ -218,15 +222,14 @@ remrunqueue(vp) void nmihand(void *framep) { -#if 0 - struct trapframe *frame = framep; -#endif - -#if DDB +#ifdef DDB printf("Abort Pressed\n"); Debugger(); #else + struct trapframe *frame = framep; + printf("Spurious NMI?\n"); + regdump(frame); #endif /* DDB */ } -- cgit v1.2.3