diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2010-05-20 21:04:26 -0500 |
---|---|---|
committer | Jason Wessel <jason.wessel@windriver.com> | 2010-05-20 21:04:26 -0500 |
commit | efe2f29e324fd20e0449bcd6dc6dbe4734c2ba94 (patch) | |
tree | ff8b2d7eddbfee39aebf7a43c6125202b6bda6d7 /kernel | |
parent | 1cee5e35f15d0893be1ba944f1aec8676e43ab76 (diff) | |
download | linux-efe2f29e324fd20e0449bcd6dc6dbe4734c2ba94.tar.bz2 |
kgdboc,kdb: Allow kdb to work on a non open console port
If kdb is open on a serial port that is not actually a console make
sure to call the poll routines to emit and receive characters.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Martin Hicks <mort@sgi.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/debug/kdb/kdb_io.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/kernel/debug/kdb/kdb_io.c b/kernel/debug/kdb/kdb_io.c index 8339b291e8bc..58be7e9c9e95 100644 --- a/kernel/debug/kdb/kdb_io.c +++ b/kernel/debug/kdb/kdb_io.c @@ -673,6 +673,14 @@ kdb_printit: if (!dbg_kdb_mode && kgdb_connected) { gdbstub_msg_write(kdb_buffer, retlen); } else { + if (!dbg_io_ops->is_console) { + len = strlen(kdb_buffer); + cp = kdb_buffer; + while (len--) { + dbg_io_ops->write_char(*cp); + cp++; + } + } while (c) { c->write(c, kdb_buffer, retlen); touch_nmi_watchdog(); @@ -719,6 +727,14 @@ kdb_printit: kdb_input_flush(); c = console_drivers; + if (!dbg_io_ops->is_console) { + len = strlen(moreprompt); + cp = moreprompt; + while (len--) { + dbg_io_ops->write_char(*cp); + cp++; + } + } while (c) { c->write(c, moreprompt, strlen(moreprompt)); touch_nmi_watchdog(); |