summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-02-05 16:49:41 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-02-05 16:49:41 +0000
commitbfb1b6126bcfdf842489313cd93b5e5a43512f3e (patch)
tree2a75a348bbc797d52960b5f52b7354f90cec7753 /sys/arch
parentfe9553578b983f487fcb86562db0ab1434df2949 (diff)
rename ddb.panic_ddb, and add ddb.console. Now you can stop console ddb entry
with a sysctl. There will be architectures and drivers that lack function, and I trust the maintainers of those will forget to add the code..
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/alpha/isa/pckbd.c8
-rw-r--r--sys/arch/hp300/hp300/machdep.c9
-rw-r--r--sys/arch/i386/isa/pccom.c8
-rw-r--r--sys/arch/i386/isa/pccons.c16
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_hdr.h5
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_kbd.c5
-rw-r--r--sys/arch/sparc/dev/zs.c5
7 files changed, 37 insertions, 19 deletions
diff --git a/sys/arch/alpha/isa/pckbd.c b/sys/arch/alpha/isa/pckbd.c
index 8a6770235fb..49e337acae7 100644
--- a/sys/arch/alpha/isa/pckbd.c
+++ b/sys/arch/alpha/isa/pckbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pckbd.c,v 1.12 1997/11/06 12:27:02 niklas Exp $ */
+/* $OpenBSD: pckbd.c,v 1.13 1998/02/05 16:47:59 deraadt Exp $ */
/* $NetBSD: pckbd.c,v 1.14 1996/12/05 01:39:30 cgd Exp $ */
/*-
@@ -757,9 +757,9 @@ pckbd_translate(dev, c)
/*
* Check for cntl-alt-esc.
*/
- if ((dt == 1)
- && (shift_state & (CTL | ALT)) == (CTL | ALT)) {
- Debugger();
+ if ((dt == 1) && (shift_state & (CTL | ALT)) == (CTL | ALT)) {
+ if (db_console)
+ Debugger();
return (NULL);
}
#endif
diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c
index 9d049a4f12e..35bb71e3209 100644
--- a/sys/arch/hp300/hp300/machdep.c
+++ b/sys/arch/hp300/hp300/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.28 1997/11/06 19:42:37 millert Exp $ */
+/* $OpenBSD: machdep.c,v 1.29 1998/02/05 16:48:22 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.94 1997/06/12 15:46:29 mrg Exp $ */
/*
@@ -1024,8 +1024,11 @@ nmihand(frame)
* - Ignore it.
*/
#ifdef DDB
- printf(": entering debugger\n");
- Debugger();
+ if (db_console) {
+ printf(": entering debugger\n");
+ Debugger();
+ } else
+ printf("\n");
#else
#ifdef PANICBUTTON
if (panicbutton) {
diff --git a/sys/arch/i386/isa/pccom.c b/sys/arch/i386/isa/pccom.c
index c8f231478b4..c315ad126aa 100644
--- a/sys/arch/i386/isa/pccom.c
+++ b/sys/arch/i386/isa/pccom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pccom.c,v 1.19 1998/02/02 22:21:20 deraadt Exp $ */
+/* $OpenBSD: pccom.c,v 1.20 1998/02/05 16:48:28 deraadt Exp $ */
/* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */
/*-
@@ -67,6 +67,9 @@
#include <dev/ic/hayespreg.h>
#endif
#define com_lcr com_cfcr
+#ifdef DDB
+#include <ddb/db_var.h>
+#endif
#include "pccomvar.h"
#include "pccom.h"
@@ -1477,7 +1480,8 @@ comsoft()
if (ISSET(lsr, LSR_BI)) {
#ifdef DDB
if (ISSET(sc->sc_hwflags, COM_HW_CONSOLE)) {
- Debugger();
+ if (db_console)
+ Debugger();
rxget = (rxget + 1) & RBUFMASK;
continue;
}
diff --git a/sys/arch/i386/isa/pccons.c b/sys/arch/i386/isa/pccons.c
index 49f1a807578..9707c0a023d 100644
--- a/sys/arch/i386/isa/pccons.c
+++ b/sys/arch/i386/isa/pccons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pccons.c,v 1.36 1997/11/06 02:26:45 deraadt Exp $ */
+/* $OpenBSD: pccons.c,v 1.37 1998/02/05 16:48:30 deraadt Exp $ */
/* $NetBSD: pccons.c,v 1.99.4.1 1996/06/04 20:03:53 cgd Exp $ */
/*-
@@ -57,6 +57,9 @@
#include <sys/kernel.h>
#include <sys/syslog.h>
#include <sys/device.h>
+#ifdef DDB
+#include <ddb/db_var.h>
+#endif
#include <dev/cons.h>
@@ -1678,8 +1681,9 @@ top:
if (pc_xmode > 0) {
#if defined(DDB) && defined(XSERVER_DDB)
/* F12 enters the debugger while in X mode */
- if (dt == 88)
- Debugger();
+ if (dt == 88 && db_console)
+ if (db_console)
+ Debugger();
#endif
capchar[0] = dt;
capchar[1] = 0;
@@ -1740,9 +1744,11 @@ top:
/*
* Check for cntl-alt-esc.
*/
- if ((dt == 1) && (shift_state & (KB_CTL | KB_ALT)) == (KB_CTL | KB_ALT)) {
+ if (db_console && dt == 1 &&
+ (shift_state & (KB_CTL | KB_ALT)) == (KB_CTL | KB_ALT)) {
screen_restore(1);
- Debugger();
+ if (db_console)
+ Debugger();
dt |= 0x80; /* discard esc (ddb discarded ctl-alt) */
}
#endif
diff --git a/sys/arch/i386/isa/pcvt/pcvt_hdr.h b/sys/arch/i386/isa/pcvt/pcvt_hdr.h
index 005318131c3..d2277444682 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_hdr.h
+++ b/sys/arch/i386/isa/pcvt/pcvt_hdr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcvt_hdr.h,v 1.17 1998/01/11 06:15:34 deraadt Exp $ */
+/* $OpenBSD: pcvt_hdr.h,v 1.18 1998/02/05 16:48:32 deraadt Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch.
@@ -88,6 +88,9 @@
#include <sys/syslog.h>
#include <sys/malloc.h>
#include <sys/time.h>
+#ifdef DDB
+#include <ddb/db_var.h>
+#endif
#include "pcvt_conf.h"
diff --git a/sys/arch/i386/isa/pcvt/pcvt_kbd.c b/sys/arch/i386/isa/pcvt/pcvt_kbd.c
index fe955ed9067..81ced849440 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_kbd.c
+++ b/sys/arch/i386/isa/pcvt/pcvt_kbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcvt_kbd.c,v 1.12 1998/01/11 06:15:35 deraadt Exp $ */
+/* $OpenBSD: pcvt_kbd.c,v 1.13 1998/02/05 16:48:34 deraadt Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch.
@@ -1437,7 +1437,8 @@ regular:
/* the string is actually not used... */
Debugger("kbd");
#else
- Debugger();
+ if (db_console)
+ Debugger();
#endif
in_Debugger = 0;
if(noblock)
diff --git a/sys/arch/sparc/dev/zs.c b/sys/arch/sparc/dev/zs.c
index 96e095c2854..8998834db13 100644
--- a/sys/arch/sparc/dev/zs.c
+++ b/sys/arch/sparc/dev/zs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zs.c,v 1.17 1997/09/17 06:47:12 downsj Exp $ */
+/* $OpenBSD: zs.c,v 1.18 1998/02/05 16:49:09 deraadt Exp $ */
/* $NetBSD: zs.c,v 1.49 1997/08/31 21:26:37 pk Exp $ */
/*
@@ -1021,7 +1021,8 @@ zsabort(unit)
#if defined(KGDB)
zskgdb(unit);
#elif defined(DDB)
- Debugger();
+ if (db_console)
+ Debugger();
#else
printf("stopping on keyboard abort\n");
callrom();