In many cases, setting db_console in /etc/rc is too late.
-.\" $OpenBSD: options.4,v 1.46 2000/02/24 16:09:14 chris Exp $
+.\" $OpenBSD: options.4,v 1.47 2000/03/02 10:50:28 art Exp $
.\" $NetBSD: options.4,v 1.21 1997/06/25 03:13:00 thorpej Exp $
.\"
.\" Copyright (c) 1998 Theo de Raadt
for details.
.Em NOTE:
not available on all architectures.
+.It Cd option DDB_SAFE_CONSOLE
+Allows a break into the kernel debugger during boot. Useful when
+debugging problems that can cause init(8) to fail.
.It Cd option KGDB
Compiles in a remote kernel debugger stub for diagnosing kernel problems
using the
-# $OpenBSD: GENERIC,v 1.61 2000/01/09 22:00:16 itojun Exp $
+# $OpenBSD: GENERIC,v 1.62 2000/03/02 10:50:29 art Exp $
#
# Machine-independent option; used by all architectures for their
# GENERIC kernel
option DEVPAGER # mmap() of devices
option DDB # in-kernel debugger
+#option DDB_SAFE_CONSOLE # allow break into ddb during boot
#makeoptions DEBUG="-g" # compile full symbol table
#makeoptions PROF="-pg" # build profiled kernel
#option GPROF # kernel profiling, kgmon(8)
-/* $OpenBSD: subr_prf.c,v 1.27 2000/02/22 19:28:04 deraadt Exp $ */
+/* $OpenBSD: subr_prf.c,v 1.28 2000/03/02 10:50:29 art Exp $ */
/* $NetBSD: subr_prf.c,v 1.45 1997/10/24 18:14:25 chuck Exp $ */
/*-
const char *panicstr; /* arg to first call to panic (used as a flag
to indicate that panic has already been called). */
#ifdef DDB
+/*
+ * Enter ddb on panic.
+ */
int db_panic = 1;
+
+/*
+ * db_console controls if we can be able to enter ddb by a special key
+ * combination (machine dependent).
+ * If DDB_SAFE_CONSOLE is defined in the kernel configuration it allows
+ * to break into console during boot. It's _really_ useful when debugging
+ * some things in the kernel that can cause init(8) to crash.
+ */
+#ifdef DDB_SAFE_CONSOLE
+int db_console = 1;
+#else
int db_console = 0;
#endif
+#endif
/*
* v_putc: routine to putc on virtual console