This fixes a bug with setting a breakpoint during kdb initialization (from kdb_cmds). Any call to kdb_printf() before the initialization of the kgdboc serial console driver (which happens much later during bootup than kdb_init), results in kernel panic due to the use of dbg_io_ops before it is initialized.
Showing the changes to kernel/debug (1 of 1 file). Show all
Unified · Split
| @@ -689,7 +689,7 @@ kdb_printit: · 688 unmodified lines | |||
| 689 | if (!dbg_kdb_mode && kgdb_connected) { | 689 | if (!dbg_kdb_mode && kgdb_connected) { |
| 690 | gdbstub_msg_write(kdb_buffer, retlen); | 690 | gdbstub_msg_write(kdb_buffer, retlen); |
| 691 | } else { | 691 | } else { |
| 692 | if (!dbg_io_ops->is_console) { | 692 | if (dbg_io_ops && !dbg_io_ops->is_console) { |
| 693 | len = strlen(kdb_buffer); | 693 | len = strlen(kdb_buffer); |
| 694 | cp = kdb_buffer; | 694 | cp = kdb_buffer; |
| 695 | while (len--) { | 695 | while (len--) { |