1 #ifndef _ASM_STACKTRACE_H
2 #define _ASM_STACKTRACE_H
4 #include <asm/ptrace.h>
7 extern int raw_show_trace
;
8 extern unsigned long unwind_stack(struct task_struct
*task
, unsigned long *sp
,
9 unsigned long pc
, unsigned long *ra
);
10 extern unsigned long unwind_stack_by_address(unsigned long stack_page
,
15 #define raw_show_trace 1
16 static inline unsigned long unwind_stack(struct task_struct
*task
,
17 unsigned long *sp
, unsigned long pc
, unsigned long *ra
)
23 static __always_inline
void prepare_frametrace(struct pt_regs
*regs
)
25 #ifndef CONFIG_KALLSYMS
27 * Remove any garbage that may be in regs (specially func
28 * addresses) to avoid show_raw_backtrace() to report them
30 memset(regs
, 0, sizeof(*regs
));
47 : "=m" (regs
->cp0_epc
),
48 "=m" (regs
->regs
[29]), "=m" (regs
->regs
[31])
52 #endif /* _ASM_STACKTRACE_H */