Subject: console_debugger()
To: None <tech-kern@netbsd.org>
From: Matt Fredette <fredette@theory.lcs.mit.edu>
List: tech-kern
Date: 03/21/2002 10:10:27
Hi. Any objections to the following patch? On the sun2, where
Debugger() is always defined, this lets me break into the ROM
monitor on a non-DDB kernel. Thanks -
Matt
--
Matt Fredette
[snip]
Index: src/sys/sys/systm.h
===================================================================
RCS file: /cvsroot/syssrc/sys/sys/systm.h,v
retrieving revision 1.142
diff -u -r1.142 systm.h
--- src/sys/sys/systm.h 2002/03/17 22:19:22 1.142
+++ src/sys/sys/systm.h 2002/03/21 15:03:29
@@ -396,6 +396,8 @@
*/
extern int db_fromconsole; /* XXX ddb/ddbvar.h */
#define console_debugger() if (db_fromconsole) Debugger()
+#elif defined(Debugger)
+#define console_debugger() Debugger()
#else
#define console_debugger() do {} while (/* CONSTCOND */ 0) /* NOP */
#endif
[snip]