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