Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1#ifndef _ASM_X86_STACKTRACE_H
2#define _ASM_X86_STACKTRACE_H
3
4extern int kstack_depth_to_print;
5
6struct thread_info;
7struct stacktrace_ops;
8
9typedef unsigned long (*walk_stack_t)(struct thread_info *tinfo,
10 unsigned long *stack,
11 unsigned long bp,
12 const struct stacktrace_ops *ops,
13 void *data,
14 unsigned long *end,
15 int *graph);
16
17extern unsigned long
18print_context_stack(struct thread_info *tinfo,
19 unsigned long *stack, unsigned long bp,
20 const struct stacktrace_ops *ops, void *data,
21 unsigned long *end, int *graph);
22
23extern unsigned long
24print_context_stack_bp(struct thread_info *tinfo,
25 unsigned long *stack, unsigned long bp,
26 const struct stacktrace_ops *ops, void *data,
27 unsigned long *end, int *graph);
28
29/* Generic stack tracer with callbacks */
30
31struct stacktrace_ops {
32 void (*warning)(void *data, char *msg);
33 /* msg must contain %s for the symbol */
34 void (*warning_symbol)(void *data, char *msg, unsigned long symbol);
35 void (*address)(void *data, unsigned long address, int reliable);
36 /* On negative return stop dumping */
37 int (*stack)(void *data, char *name);
38 walk_stack_t walk_stack;
39};
40
41void dump_trace(struct task_struct *tsk, struct pt_regs *regs,
42 unsigned long *stack, unsigned long bp,
43 const struct stacktrace_ops *ops, void *data);
44
45#endif /* _ASM_X86_STACKTRACE_H */