unwind.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #ifndef _LINUX_UNWIND_H
  2. #define _LINUX_UNWIND_H
  3. /*
  4. * Copyright (C) 2002-2006 Novell, Inc.
  5. * Jan Beulich <jbeulich@novell.com>
  6. * This code is released under version 2 of the GNU GPL.
  7. *
  8. * A simple API for unwinding kernel stacks. This is used for
  9. * debugging and error reporting purposes. The kernel doesn't need
  10. * full-blown stack unwinding with all the bells and whistles, so there
  11. * is not much point in implementing the full Dwarf2 unwind API.
  12. */
  13. struct module;
  14. struct unwind_frame_info {};
  15. static inline void unwind_init(void) {}
  16. static inline void unwind_setup(void) {}
  17. #ifdef CONFIG_MODULES
  18. static inline void *unwind_add_table(struct module *mod,
  19. const void *table_start,
  20. unsigned long table_size)
  21. {
  22. return NULL;
  23. }
  24. static inline void unwind_remove_table(void *handle, int init_only)
  25. {
  26. }
  27. #endif
  28. static inline int unwind_init_frame_info(struct unwind_frame_info *info,
  29. struct task_struct *tsk,
  30. const struct pt_regs *regs)
  31. {
  32. return -ENOSYS;
  33. }
  34. static inline int unwind_init_blocked(struct unwind_frame_info *info,
  35. struct task_struct *tsk)
  36. {
  37. return -ENOSYS;
  38. }
  39. static inline int unwind_init_running(struct unwind_frame_info *info,
  40. asmlinkage int (*cb)(struct unwind_frame_info *,
  41. void *arg),
  42. void *arg)
  43. {
  44. return -ENOSYS;
  45. }
  46. static inline int unwind(struct unwind_frame_info *info)
  47. {
  48. return -ENOSYS;
  49. }
  50. static inline int unwind_to_user(struct unwind_frame_info *info)
  51. {
  52. return -ENOSYS;
  53. }
  54. #endif /* _LINUX_UNWIND_H */