unwinder.h 856 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _LINUX_UNWINDER_H
  3. #define _LINUX_UNWINDER_H
  4. #include <asm/stacktrace.h>
  5. struct unwinder {
  6. const char *name;
  7. struct list_head list;
  8. int rating;
  9. void (*dump)(struct task_struct *, struct pt_regs *,
  10. unsigned long *, const struct stacktrace_ops *, void *);
  11. };
  12. extern int unwinder_init(void);
  13. extern int unwinder_register(struct unwinder *);
  14. extern void unwind_stack(struct task_struct *, struct pt_regs *,
  15. unsigned long *, const struct stacktrace_ops *,
  16. void *);
  17. extern void stack_reader_dump(struct task_struct *, struct pt_regs *,
  18. unsigned long *, const struct stacktrace_ops *,
  19. void *);
  20. /*
  21. * Used by fault handling code to signal to the unwinder code that it
  22. * should switch to a different unwinder.
  23. */
  24. extern int unwinder_faulted;
  25. #endif /* _LINUX_UNWINDER_H */