sh: Use the new stack unwinder API
Instead of implementing our own stack unwinder via dump_trace() we should use the new stack unwinder API because it is more modular. This change allows us to decouple the interface for generating stacktraces from the implementation of a stack unwinder. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
@ -17,6 +17,7 @@
|
||||
#include <linux/sched.h>
|
||||
#include <linux/kallsyms.h>
|
||||
#include <linux/mm.h>
|
||||
#include <asm/unwinder.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/sections.h>
|
||||
@ -120,8 +121,8 @@ void sh_backtrace(struct pt_regs * const regs, unsigned int depth)
|
||||
stackaddr = (unsigned long *)regs->regs[15];
|
||||
if (!user_mode(regs)) {
|
||||
if (depth)
|
||||
dump_trace(NULL, regs, stackaddr,
|
||||
&backtrace_ops, &depth);
|
||||
unwind_stack(NULL, regs, stackaddr,
|
||||
&backtrace_ops, &depth);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user