aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/debug/kdb
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2010-05-20 22:04:26 -0400
committerJason Wessel <jason.wessel@windriver.com>2010-05-20 22:04:26 -0400
commitefe2f29e324fd20e0449bcd6dc6dbe4734c2ba94 (patch)
treeff8b2d7eddbfee39aebf7a43c6125202b6bda6d7 /kernel/debug/kdb
parent1cee5e35f15d0893be1ba944f1aec8676e43ab76 (diff)
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/debug/kdb')
-rw-r--r--kernel/debug/kdb/kdb_io.c16
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:
673 if (!dbg_kdb_mode && kgdb_connected) { 673 if (!dbg_kdb_mode && kgdb_connected) {
674 gdbstub_msg_write(kdb_buffer, retlen); 674 gdbstub_msg_write(kdb_buffer, retlen);
675 } else { 675 } else {
676 if (!dbg_io_ops->is_console) {
677 len = strlen(kdb_buffer);
678 cp = kdb_buffer;
679 while (len--) {
680 dbg_io_ops->write_char(*cp);
681 cp++;
682 }
683 }
676 while (c) { 684 while (c) {
677 c->write(c, kdb_buffer, retlen); 685 c->write(c, kdb_buffer, retlen);
678 touch_nmi_watchdog(); 686 touch_nmi_watchdog();
@@ -719,6 +727,14 @@ kdb_printit:
719 kdb_input_flush(); 727 kdb_input_flush();
720 c = console_drivers; 728 c = console_drivers;
721 729
730 if (!dbg_io_ops->is_console) {
731 len = strlen(moreprompt);
732 cp = moreprompt;
733 while (len--) {
734 dbg_io_ops->write_char(*cp);
735 cp++;
736 }
737 }
722 while (c) { 738 while (c) {
723 c->write(c, moreprompt, strlen(moreprompt)); 739 c->write(c, moreprompt, strlen(moreprompt));
724 touch_nmi_watchdog(); 740 touch_nmi_watchdog();