-> il2cpp::vm::Runtime::Init -> il2cpp::vm::MetadataCache::Initialize -> il2cpp::vm::MetadataLoader::LoadMetadataFile 于是直接搜 init 即可找到 il2cpp::vm::Runtime::Init。 随后进入该函数后一个个查找对比源码可以发现 sub_4B5564 为 il2cpp::vm::MetadataCache::Init...
However, each // thread is reading from the same read-only metadata, so each thread will set the same values. // Therefore, we can safely ignore thread sanitizer issues in this method. void* il2cpp::vm::GlobalMetadata::InitializeRuntimeMetadata(uintptr_t* metadataPointer, bool ...
count;uint16 nested_type_count;uint16 vtable_count;uint16 interfaces_count;uint16 interface_offsets_count;// bitfield to portably encode boolean values as single bits// 01 - valuetype;// 02 - enumtype;// 03 - has_finalize;// 04 - has_cctor;// 05 - is_blittable;// 06 - is_...
il2cpp_is_debugger_attached il2cpp_is_vm_thread il2cpp_monitor_enter il2cpp_monitor_exit il2cpp_monitor_pulse il2cpp_monitor_pulse_all il2cpp_monitor_try_enter il2cpp_monitor_try_wait il2cpp_monitor_wait il2cpp_object_header_size il2cpp_offset_of_array_bounds_in_array_object_header il2cpp_...
cc.ThreadTest (); Debug.Log (cc.GetType ()); } // Update is called once per frame void Update () { } int CoconutFuncStudy(int a, int b) { return a + b; } } 这个文件里面的内容就更简单了:一个CoconutClassStudy类,里面有一个构造函数,一个Add函数和一个IOTest函数。另外在MonoBehaviour...
Il2CppThread **il2cpp_thread_get_all_attached_threads(size_t *size); _BOOL4 il2cpp_is_vm_thread(Il2CppThread *thread); void il2cpp_current_thread_walk_frame_stack(Il2CppFrameWalkFunc func, void *user_data); void il2cpp_thread_walk_frame_stack(Il2CppThread *thread, Il2CppFrameWalkFunc ...
在同一个文件里可以找到这个函il2cpp::vm::GlobalMetadata::Register然后通过调用关系分析,我们可以找到在Il2cpp代码中只有il2cpp::vm::MetadataCache::Register这个函数调用了它,并且初始化了三个数据结构Il2CppCodeRegistration,Il2CppMetadataRegistration和Il2CppCodeGenOptions。这三个数据结构是和源码相关的,我们去应用...
vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) + 112 (Runtime.cpp:559) 28 UnityFramework 0x000000010ca3df68 il2cpp::icalls::mscorlib::System::Threading::ThreadStart(void*) + 108 (Thread.cpp:156) 29 UnityFramework 0x000000010ca5ef8c il2cpp::os...
Finding the metadata loader: What if there is no il2cpp_init? 那么以上套路是针对我们能在 il2cpp 里找到 il2cpp_init 的函数,但是如果没有,我们就要继续往上找 UnityPlayer.dll 或者 libunity.so,而这个我们没有办法用源码对照,不过我们可以创建一个 Unity 项目生成 PDB,就可以看到名字和符号那些。 对于这...
// Use this for initialization void Start () { Debug.Log (CoconutFuncStudy (10 , 20)); CoconutClassStudy cc = new CoconutClassStudy (50, 60); Debug.Log (cc.Add ()); cc.IOTest("test.txt"); cc.ThreadTest (); Debug.Log (cc.GetType ()); } // Update is called once per frame...