History

kdb: Avoid using dbg_io_ops until it is initialized

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.

Tim Bird committed 15 years ago

Commit b8adde81 parent bec4d621 file · +1 −1Browse files

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

Unified · Split

kernel/debug/kdb/kdb_io.c+1−1
@@ -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--) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t