Add processing of v24+ modules and double-indirected method pointers

This commit is contained in:
Katy Coe
2019-10-16 16:37:12 +02:00
parent a638e86c38
commit 70def274a7
3 changed files with 52 additions and 8 deletions

View File

@@ -14,6 +14,7 @@ namespace Il2CppInspector.Reflection {
// IL2CPP-specific data
public Il2CppReflector Model { get; }
public Il2CppImageDefinition Definition { get; }
public Il2CppCodeGenModule Module { get; }
public int Index { get; }
// TODO: CustomAttributes
@@ -41,6 +42,10 @@ namespace Il2CppInspector.Reflection {
// TODO: Generate EntryPoint method from entryPointIndex
}
// Find corresponding module (we'll need this for method pointers)
if (Model.Package.Metadata.Version >= 24.1)
Module = Model.Package.Binary.Modules[FullName];
// Generate types in DefinedTypes from typeStart to typeStart+typeCount-1
for (var t = Definition.typeStart; t < Definition.typeStart + Definition.typeCount; t++)
DefinedTypes.Add(new TypeInfo(Model.Package, t, this));