提交 c97d20a6 编写于 作者: A Andi Kleen 提交者: Linus Torvalds

[PATCH] i386: Do backtrace fallback too

Similar patch to earlier x86-64 patch. When the dwarf2 unwinder fails
dump the left over stack with the old unwinder.

Also some clarifications in the headers.
Signed-off-by: NAndi Kleen <ak@suse.de>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 b783fd92
......@@ -187,10 +187,21 @@ static void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
if (unwind_init_blocked(&info, task) == 0)
unw_ret = show_trace_unwind(&info, log_lvl);
}
if (unw_ret > 0) {
if (call_trace > 0)
if (unw_ret > 0 && !arch_unw_user_mode(&info)) {
#ifdef CONFIG_STACK_UNWIND
print_symbol("DWARF2 unwinder stuck at %s\n",
UNW_PC(info.regs));
if (call_trace == 1) {
printk("Leftover inexact backtrace:\n");
if (UNW_SP(info.regs))
stack = (void *)UNW_SP(info.regs);
} else if (call_trace > 1)
return;
printk("%sLegacy call trace:\n", log_lvl);
else
printk("Full inexact backtrace again:\n");
#else
printk("Inexact backtrace:\n");
#endif
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册