1 /* 2 * Header for stack related functions 3 * 4 * This code is free software; you can redistribute it and/or modify it 5 * under the terms of the GNU Library General Public License version 2. 6 */ 7 #ifndef _STACK_H_ 8 #define _STACK_H_ 9 10 #include <libcflat.h> 11 #include <asm/stack.h> 12 13 #ifdef HAVE_ARCH_BACKTRACE_FRAME 14 extern int backtrace_frame(const void *frame, const void **return_addrs, 15 int max_depth); 16 #else 17 static inline int 18 backtrace_frame(const void *frame __unused, const void **return_addrs __unused, 19 int max_depth __unused) 20 { 21 return 0; 22 } 23 #endif 24 25 extern int backtrace(const void **return_addrs, int max_depth); 26 27 #endif 28