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
6int x86_is_stack_id(int id, char *name);
7
8struct thread_info;
9struct stacktrace_ops;
10
11typedef unsigned long (*walk_stack_t)(struct thread_info *tinfo,
12 unsigned long *stack,
13 unsigned long bp,
14 const struct stacktrace_ops *ops,
15 void *data,
16 unsigned long *end,
17 int *graph);
18
19extern unsigned long
20print_context_stack(struct thread_info *tinfo,
21 unsigned long *stack, unsigned long bp,
22 const struct stacktrace_ops *ops, void *data,
23 unsigned long *end, int *graph);
24
25extern unsigned long
26print_context_stack_bp(struct thread_info *tinfo,
27 unsigned long *stack, unsigned long bp,
28 const struct stacktrace_ops *ops, void *data,
29 unsigned long *end, int *graph);
30
31/* Generic stack tracer with callbacks */
32
33struct stacktrace_ops {
34 void (*warning)(void *data, char *msg);
35 /* msg must contain %s for the symbol */
36 void (*warning_symbol)(void *data, char *msg, unsigned long symbol);
37 void (*address)(void *data, unsigned long address, int reliable);
38 /* On negative return stop dumping */
39 int (*stack)(void *data, char *name);
40 walk_stack_t walk_stack;
41};
42
43void dump_trace(struct task_struct *tsk, struct pt_regs *regs,
44 unsigned long *stack, unsigned long bp,
45 const struct stacktrace_ops *ops, void *data);
46
47#endif /* _ASM_X86_STACKTRACE_H */