From: Sepherosa Ziehau Date: Thu, 25 Sep 2008 13:30:15 +0000 (+0000) Subject: If not in debugger, output kernel debug information to both the console and X-Git-Tag: v2.1.1~323 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/61c31fdcb355f45344787c06d94c8301d65fe9a3 If not in debugger, output kernel debug information to both the console and kernel message buffer via printf. Obtained-from: FreeBSD --- diff --git a/sys/ddb/db_output.c b/sys/ddb/db_output.c index 467acd5756..4236cc7a0c 100644 --- a/sys/ddb/db_output.c +++ b/sys/ddb/db_output.c @@ -24,7 +24,7 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/ddb/db_output.c,v 1.26 1999/08/28 00:41:09 peter Exp $ - * $DragonFly: src/sys/ddb/db_output.c,v 1.8 2006/12/18 20:41:01 dillon Exp $ + * $DragonFly: src/sys/ddb/db_output.c,v 1.9 2008/09/25 13:30:15 sephe Exp $ */ /* @@ -100,6 +100,19 @@ db_force_whitespace(void) static void db_putchar(int c, void *arg) { + /* + * If not in the debugger, output data to both the console and + * the message buffer. + */ + if (!db_active) { + kprintf("%c", c); + if (!db_active) + return; + if (c == '\r' || c == '\n') + db_check_interrupt(); + return; + } + if (c > ' ' && c <= '~') { /* * Printing character.