17 #include <linux/sched.h>
21 #include <asm/ptrace.h>
22 #include <asm/uaccess.h>
23 #include <asm/sections.h>
24 #include <asm/stacktrace.h>
26 static int backtrace_stack(
void *
data,
char *
name)
32 static void backtrace_address(
void *
data,
unsigned long addr,
int reliable)
41 .stack = backtrace_stack,
42 .address = backtrace_address,
46 static int backtrace_limit = 20;
48 static unsigned long *
49 user_backtrace(
unsigned long *stackaddr,
struct pt_regs *
regs)
51 unsigned long buf_stack;
73 unsigned long *stackaddr;
78 if (depth > backtrace_limit)
79 depth = backtrace_limit;
85 &backtrace_ops, &depth);
89 while (depth-- && (stackaddr !=
NULL))
90 stackaddr = user_backtrace(stackaddr, regs);