StackTrace.h 548 B

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #include <string>
  3. #include <vector>
  4. namespace il2cpp
  5. {
  6. namespace os
  7. {
  8. typedef bool(*WalkStackCallback)(Il2CppMethodPointer frame, void* context);
  9. class StackTrace
  10. {
  11. public:
  12. enum WalkOrder
  13. {
  14. kFirstCalledToLastCalled,
  15. kLastCalledToFirstCalled
  16. };
  17. // Walks the stack calling callback for each frame in the stack
  18. // Stops when callback returns false
  19. static void WalkStack(WalkStackCallback callback, void* context, WalkOrder walkOrder);
  20. };
  21. }
  22. }