stack.h 628 B

123456789101112131415161718192021222324252627
  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. #include <libcflat.h>
  10. #include <asm/stack.h>
  11. #ifdef HAVE_ARCH_BACKTRACE_FRAME
  12. extern int backtrace_frame(const void *frame, const void **return_addrs,
  13. int max_depth);
  14. #else
  15. static inline int
  16. backtrace_frame(const void *frame __unused, const void **return_addrs __unused,
  17. int max_depth __unused)
  18. {
  19. return 0;
  20. }
  21. #endif
  22. extern int backtrace(const void **return_addrs, int max_depth);
  23. #endif