stacktrace.h 1.0 KB
Newer Older
1 2 3
#ifndef __LINUX_STACKTRACE_H
#define __LINUX_STACKTRACE_H

4
struct task_struct;
5
struct pt_regs;
6

7
#ifdef CONFIG_STACKTRACE
8 9
struct task_struct;

10 11 12
struct stack_trace {
	unsigned int nr_entries, max_entries;
	unsigned long *entries;
13
	int skip;	/* input argument: How many entries to skip */
14 15
};

C
Christoph Hellwig 已提交
16
extern void save_stack_trace(struct stack_trace *trace);
17 18
extern void save_stack_trace_regs(struct pt_regs *regs,
				  struct stack_trace *trace);
A
Arjan van de Ven 已提交
19 20
extern void save_stack_trace_tsk(struct task_struct *tsk,
				struct stack_trace *trace);
21 22

extern void print_stack_trace(struct stack_trace *trace, int spaces);
23

24
#ifdef CONFIG_USER_STACKTRACE_SUPPORT
25 26 27 28 29
extern void save_stack_trace_user(struct stack_trace *trace);
#else
# define save_stack_trace_user(trace)              do { } while (0)
#endif

30
#else
C
Christoph Hellwig 已提交
31
# define save_stack_trace(trace)			do { } while (0)
A
Arjan van de Ven 已提交
32
# define save_stack_trace_tsk(tsk, trace)		do { } while (0)
33
# define save_stack_trace_user(trace)			do { } while (0)
34
# define print_stack_trace(trace, spaces)		do { } while (0)
35 36 37
#endif

#endif