History

debug_core,kdb: fix crash when arch does not have single step

When an arch such as mips and microblaze does not implement either HW or software single stepping the debug core should re-enter kdb. The kdb code will properly ignore the single step operation. Attempting to single step the kernel without software or hardware support causes unpredictable kernel crashes.

Jason Wessel committed 16 years ago

Commit 3fa43ab1 parent df493931 file · +2 −0Browse files

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

Unified · Split

kernel/debug/debug_core.c+2−0
@@ -605,6 +605,8 @@ cpu_master_loop: · 604 unmodified lines
605 if (dbg_kdb_mode) {605 if (dbg_kdb_mode) {
606 kgdb_connected = 1;606 kgdb_connected = 1;
607 error = kdb_stub(ks);607 error = kdb_stub(ks);
608 if (error == -1)
609 continue;
608 kgdb_connected = 0;610 kgdb_connected = 0;
609 } else {611 } else {
610 error = gdb_serial_stub(ks);612 error = gdb_serial_stub(ks);