History

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.

Jason Wessel committed 16 years ago

Commit efe2f291 parent 1cee5e33 files · +33 −0Browse files

Showing the changes to kernel/debug (1 of 3 files). Show all

Unified · Split

kernel/debug/kdb/kdb_io.c+16−0
@@ -673,6 +673,14 @@ kdb_printit: · 672 unmodified lines
673673 if (!dbg_kdb_mode && kgdb_connected) {
674674 gdbstub_msg_write(kdb_buffer, retlen);
675675 } 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+ }
676684 while (c) {
677685 c->write(c, kdb_buffer, retlen);
678686 touch_nmi_watchdog();
@@ -719,6 +727,14 @@ kdb_printit: · 40 unmodified lines
719727 kdb_input_flush();
720728 c = console_drivers;
721729
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+ }
722738 while (c) {
723739 c->write(c, moreprompt, strlen(moreprompt));
724740 touch_nmi_watchdog();