diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2010-08-05 10:22:25 -0400 |
---|---|---|
committer | Jason Wessel <jason.wessel@windriver.com> | 2010-08-05 10:22:25 -0400 |
commit | 3fa43aba08c5b5a4b407e402606fbe463239b14a (patch) | |
tree | 83c6b8a61a1c8a8795504217518300417c49c6a6 /kernel/debug | |
parent | df4939350b345ebb44937902827aa75b8ad4998c (diff) |
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.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Diffstat (limited to 'kernel/debug')
-rw-r--r-- | kernel/debug/debug_core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c index 8bc5eeffec8a..9ed9307615d9 100644 --- a/kernel/debug/debug_core.c +++ b/kernel/debug/debug_core.c | |||
@@ -605,6 +605,8 @@ cpu_master_loop: | |||
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); |