1 #ifndef _LIBLOCKDEP_LINUX_STACKTRACE_H_
2 #define _LIBLOCKDEP_LINUX_STACKTRACE_H_
7 unsigned int nr_entries, max_entries;
8 unsigned long *entries;
12 static inline void print_stack_trace(struct stack_trace *trace, int spaces)
14 backtrace_symbols_fd((void **)trace->entries, trace->nr_entries, 1);
17 #define save_stack_trace(trace) \
18 ((trace)->nr_entries = \
19 backtrace((void **)(trace)->entries, (trace)->max_entries))
21 static inline int dump_stack(void)
26 size = backtrace(array, 64);
27 backtrace_symbols_fd(array, size, 1);