unwind.h 783 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef __UNWIND_H
  2. #define __UNWIND_H
  3. #include "types.h"
  4. #include "event.h"
  5. #include "symbol.h"
  6. struct unwind_entry {
  7. struct map *map;
  8. struct symbol *sym;
  9. u64 ip;
  10. };
  11. typedef int (*unwind_entry_cb_t)(struct unwind_entry *entry, void *arg);
  12. #ifndef NO_LIBUNWIND_SUPPORT
  13. int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
  14. struct machine *machine,
  15. struct thread *thread,
  16. u64 sample_uregs,
  17. struct perf_sample *data);
  18. int unwind__arch_reg_id(int regnum);
  19. #else
  20. static inline int
  21. unwind__get_entries(unwind_entry_cb_t cb __used, void *arg __used,
  22. struct machine *machine __used,
  23. struct thread *thread __used,
  24. u64 sample_uregs __used,
  25. struct perf_sample *data __used)
  26. {
  27. return 0;
  28. }
  29. #endif /* NO_LIBUNWIND_SUPPORT */
  30. #endif /* __UNWIND_H */