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.
Unified · Split
| @@ -605,6 +605,8 @@ cpu_master_loop: · 604 unmodified lines | ||
| 605 | 605 | if (dbg_kdb_mode) { |
| 606 | 606 | kgdb_connected = 1; |
| 607 | 607 | error = kdb_stub(ks); |
| 608 | + if (error == -1) | |
| 609 | + continue; | |
| 608 | 610 | kgdb_connected = 0; |
| 609 | 611 | } else { |
| 610 | 612 | error = gdb_serial_stub(ks); |