Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/arch/mvme68k/mvme68k Avoid calling printf() when we...
details: https://anonhg.NetBSD.org/src/rev/c205b5dfc994
branches: netbsd-1-5
changeset: 488967:c205b5dfc994
user: scw <scw%NetBSD.org@localhost>
date: Tue Aug 08 08:17:28 2000 +0000
description:
Avoid calling printf() when we're either in DDB, or about to call
Debugger(). Use db_printf() instead.
This fixes a problem whereby it was impossible to enter the debugger
if the CPU was spinning in lockmgr() for the proclist lock, because
printf() calls logwakeup(), which eventually calls proclist_lock_read(),
which then spins in lockmgr() yet again...
diffstat:
sys/arch/mvme68k/mvme68k/db_memrw.c | 11 ++++++++++-
sys/arch/mvme68k/mvme68k/machdep.c | 5 +++--
2 files changed, 13 insertions(+), 3 deletions(-)
diffs (66 lines):
diff -r f9c0d0512429 -r c205b5dfc994 sys/arch/mvme68k/mvme68k/db_memrw.c
--- a/sys/arch/mvme68k/mvme68k/db_memrw.c Mon Aug 07 23:44:30 2000 +0000
+++ b/sys/arch/mvme68k/mvme68k/db_memrw.c Tue Aug 08 08:17:28 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_memrw.c,v 1.4 1998/08/22 10:55:34 scw Exp $ */
+/* $NetBSD: db_memrw.c,v 1.4.26.1 2000/08/08 08:17:28 scw Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -55,6 +55,8 @@
* by Jason R. Thorpe <thorpej%NetBSD.ORG@localhost>.
*/
+#include "opt_ddb.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
@@ -67,6 +69,9 @@
#include <m68k/cacheops.h>
#include <ddb/db_access.h>
+#ifdef DDB
+#include <ddb/db_output.h>
+#endif
static void db_write_text __P((vaddr_t, size_t, char *));
@@ -161,7 +166,11 @@
oldpte = *pte;
if ((oldpte & PG_V) == 0) {
+#ifdef DDB
+ db_printf(" address %p not a valid page\n", dst);
+#else
printf(" address %p not a valid page\n", dst);
+#endif
return;
}
diff -r f9c0d0512429 -r c205b5dfc994 sys/arch/mvme68k/mvme68k/machdep.c
--- a/sys/arch/mvme68k/mvme68k/machdep.c Mon Aug 07 23:44:30 2000 +0000
+++ b/sys/arch/mvme68k/mvme68k/machdep.c Tue Aug 08 08:17:28 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.67 2000/06/05 23:45:00 jhawk Exp $ */
+/* $NetBSD: machdep.c,v 1.67.2.1 2000/08/08 08:17:28 scw Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -95,6 +95,7 @@
#ifdef DDB
#include <machine/db_machdep.h>
#include <ddb/db_extern.h>
+#include <ddb/db_output.h>
#endif
#define MAXMEM 64*1024 /* XXX - from cmap.h */
@@ -1176,7 +1177,7 @@
const char *cp;
{
#ifdef DDB
- printf("%s\n", cp);
+ db_printf("%s\n", cp);
Debugger();
#else
#ifdef PANICBUTTON
Home |
Main Index |
Thread Index |
Old Index