Skip to content

Commit

Permalink
debug_core,kdb: fix crash when arch does not have single step
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jwessel committed Aug 5, 2010
1 parent df49393 commit 3fa43ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/debug/debug_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,8 @@ static int kgdb_cpu_enter(struct kgdb_state *ks, struct pt_regs *regs)
if (dbg_kdb_mode) {
kgdb_connected = 1;
error = kdb_stub(ks);
if (error == -1)
continue;
kgdb_connected = 0;
} else {
error = gdb_serial_stub(ks);
Expand Down

0 comments on commit 3fa43ab

Please sign in to comment.