12 #include <linux/sched.h>
17 #include <asm/ptrace.h>
18 #include <asm/stacktrace.h>
20 static int backtrace_stack(
void *
data,
char *
name)
26 static void backtrace_address(
void *
data,
unsigned long addr,
int reliable)
35 .stack = backtrace_stack,
36 .address = backtrace_address,
50 if (bytes !=
sizeof(bufhead))
66 x86_backtrace_32(
struct pt_regs *
const regs,
unsigned int depth)
75 while (depth-- && head)
76 head = dump_user_backtrace_32(head);
83 x86_backtrace_32(
struct pt_regs *
const regs,
unsigned int depth)
96 if (bytes !=
sizeof(bufhead))
103 if (head >= bufhead[0].next_frame)
106 return bufhead[0].next_frame;
114 if (!user_mode_vm(regs)) {
118 &backtrace_ops, &depth);
122 if (x86_backtrace_32(regs, depth))
125 while (depth-- && head)
126 head = dump_user_backtrace(head);