提交 3fa43aba 编写于 作者: J Jason Wessel

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: NJason Wessel <jason.wessel@windriver.com>
上级 df493935
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册