Update for the KDB framework:

o  Check kdb_active instead of db_active and do so unconditionally.
This commit is contained in:
Marcel Moolenaar 2004-07-10 21:43:23 +00:00
parent eba21ad501
commit 82ebaee7a3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=131931
2 changed files with 6 additions and 18 deletions

View File

@ -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);

View File

@ -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() == '.')