]>
Commit | Line | Data |
---|---|---|
8637c099 IM |
1 | #ifndef __LINUX_STACKTRACE_H |
2 | #define __LINUX_STACKTRACE_H | |
3 | ||
897312bd | 4 | struct task_struct; |
9c0729dc | 5 | struct pt_regs; |
897312bd | 6 | |
8637c099 | 7 | #ifdef CONFIG_STACKTRACE |
b618ad31 VN |
8 | struct task_struct; |
9 | ||
8637c099 IM |
10 | struct stack_trace { |
11 | unsigned int nr_entries, max_entries; | |
12 | unsigned long *entries; | |
5a1b3999 | 13 | int skip; /* input argument: How many entries to skip */ |
8637c099 IM |
14 | }; |
15 | ||
ab1b6f03 | 16 | extern void save_stack_trace(struct stack_trace *trace); |
39581062 MH |
17 | extern void save_stack_trace_regs(struct pt_regs *regs, |
18 | struct stack_trace *trace); | |
9745512c AV |
19 | extern void save_stack_trace_tsk(struct task_struct *tsk, |
20 | struct stack_trace *trace); | |
8637c099 IM |
21 | |
22 | extern void print_stack_trace(struct stack_trace *trace, int spaces); | |
02b67518 | 23 | |
8d26487f | 24 | #ifdef CONFIG_USER_STACKTRACE_SUPPORT |
02b67518 TE |
25 | extern void save_stack_trace_user(struct stack_trace *trace); |
26 | #else | |
27 | # define save_stack_trace_user(trace) do { } while (0) | |
28 | #endif | |
29 | ||
8637c099 | 30 | #else |
ab1b6f03 | 31 | # define save_stack_trace(trace) do { } while (0) |
9745512c | 32 | # define save_stack_trace_tsk(tsk, trace) do { } while (0) |
8d7c6a96 | 33 | # define save_stack_trace_user(trace) do { } while (0) |
3b5ad079 | 34 | # define print_stack_trace(trace, spaces) do { } while (0) |
8637c099 IM |
35 | #endif |
36 | ||
37 | #endif |