少年修仙传客户端基础资源
hch
2024-04-02 e51f4612104ff380475b9ef4ef78e0388bb4e9a3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
 
#include "il2cpp-config.h"
#include <stdint.h>
#include <vector>
#include "mono-api.h"
 
namespace mono
{
namespace vm
{
    typedef std::vector<MonoStackFrameInfo> StackFrames;
 
    class StackTrace
    {
    public:
        static void InitializeStackTracesForCurrentThread();
        static void CleanupStackTracesForCurrentThread();
 
        // Current thread functions
        static const StackFrames* GetStackFrames();
        static bool GetStackFrameAt(int32_t depth, MonoStackFrameInfo& frame);
        static void WalkFrameStack(MonoInternalStackWalk callback, MonoContext* context, void *user_data);
 
        inline static size_t GetStackDepth() { return GetStackFrames()->size(); }
        inline static bool GetTopStackFrame(MonoStackFrameInfo& frame) { return GetStackFrameAt(0, frame); }
 
        static void PushFrame(MonoStackFrameInfo& frame);
        static void PopFrame();
 
        // Remote thread functions
        static bool GetThreadStackFrameAt(MonoThread* thread, int32_t depth, MonoStackFrameInfo& frame);
        static void WalkThreadFrameStack(MonoThread* thread, MonoInternalStackWalk callback, MonoContext* context, void* user_data);
        static int32_t GetThreadStackDepth(MonoThread* thread);
        static bool GetThreadTopStackFrame(MonoThread* thread, MonoStackFrameInfo& frame);
    };
}
}