diff options
author | marcel <marcel@FreeBSD.org> | 2004-07-10 21:43:23 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2004-07-10 21:43:23 +0000 |
commit | 54e2d39fa084cad1ce98614653948c6a8251887d (patch) | |
tree | cd28bfaa534687c3ae4805470a2b7346bf39b4d9 | |
parent | ccf2260d9ba605628d9c925180e41b3856e03972 (diff) | |
download | FreeBSD-src-54e2d39fa084cad1ce98614653948c6a8251887d.zip FreeBSD-src-54e2d39fa084cad1ce98614653948c6a8251887d.tar.gz |
Update for the KDB framework:
o Check kdb_active instead of db_active and do so unconditionally.
-rw-r--r-- | sys/kern/subr_prf.c | 5 | ||||
-rw-r--r-- | sys/kern/tty_cons.c | 19 |
2 files changed, 6 insertions, 18 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index 3650ca1..393906f 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/systm.h> #include <sys/lock.h> +#include <sys/kdb.h> #include <sys/mutex.h> #include <sys/sx.h> #include <sys/kernel.h> @@ -333,10 +334,8 @@ putchar(int c, void *arg) /* Don't use the tty code after a panic or while in ddb. */ if (panicstr) consdirect = 1; -#ifdef DDB - if (db_active) + if (kdb_active) consdirect = 1; -#endif if (consdirect) { if (c != '\0') cnputc(c); diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c index e44ea5f..54a287c 100644 --- a/sys/kern/tty_cons.c +++ b/sys/kern/tty_cons.c @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include <sys/conf.h> #include <sys/cons.h> #include <sys/fcntl.h> +#include <sys/kdb.h> #include <sys/kernel.h> #include <sys/malloc.h> #include <sys/msgbuf.h> @@ -562,16 +563,12 @@ cncheckc(void) return (-1); STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) { cn = cnd->cnd_cn; -#ifdef DDB - if (!db_active || !(cn->cn_flags & CN_FLAG_NODEBUG)) { -#endif + if (!kdb_active || !(cn->cn_flags & CN_FLAG_NODEBUG)) { c = cn->cn_checkc(cn); if (c != -1) { return (c); } -#ifdef DDB } -#endif } return (-1); } @@ -587,21 +584,13 @@ cnputc(int c) return; STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) { cn = cnd->cnd_cn; -#ifdef DDB - if (!db_active || !(cn->cn_flags & CN_FLAG_NODEBUG)) { -#endif + if (!kdb_active || !(cn->cn_flags & CN_FLAG_NODEBUG)) { if (c == '\n') cn->cn_putc(cn, '\r'); cn->cn_putc(cn, c); -#ifdef DDB } -#endif } -#ifdef DDB - if (console_pausing && !db_active && (c == '\n')) { -#else - if (console_pausing && (c == '\n')) { -#endif + if (console_pausing && c == '\n' && !kdb_active) { for (cp = console_pausestr; *cp != '\0'; cp++) cnputc(*cp); if (cngetc() == '.') |