IL2CPP: Process Il2CppGenericMethodFunctionsDefinitions and Il2CppGenericMethodIndices
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2017 Perfare - https://github.com/Perfare/Il2CppDumper
|
Copyright 2017 Perfare - https://github.com/Perfare/Il2CppDumper
|
||||||
Copyright 2017-2019 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com
|
Copyright 2017-2020 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com
|
||||||
|
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
*/
|
*/
|
||||||
@@ -46,6 +46,9 @@ namespace Il2CppInspector
|
|||||||
// List of run-time concrete generic class and method signatures
|
// List of run-time concrete generic class and method signatures
|
||||||
public List<Il2CppGenericInst> GenericInstances { get; private set; }
|
public List<Il2CppGenericInst> GenericInstances { get; private set; }
|
||||||
|
|
||||||
|
// List of constructed generic method function pointers corresponding to each possible method instantiation
|
||||||
|
public Dictionary<Il2CppMethodSpec, ulong> GenericMethodPointers { get; } = new Dictionary<Il2CppMethodSpec, ulong>();
|
||||||
|
|
||||||
// Every defined type
|
// Every defined type
|
||||||
public List<Il2CppType> TypeReferences { get; private set; }
|
public List<Il2CppType> TypeReferences { get; private set; }
|
||||||
|
|
||||||
@@ -200,6 +203,14 @@ namespace Il2CppInspector
|
|||||||
|
|
||||||
// Concrete generic class and method signatures
|
// Concrete generic class and method signatures
|
||||||
GenericInstances = image.ReadMappedObjectPointerArray<Il2CppGenericInst>(MetadataRegistration.genericInsts, (int) MetadataRegistration.genericInstsCount);
|
GenericInstances = image.ReadMappedObjectPointerArray<Il2CppGenericInst>(MetadataRegistration.genericInsts, (int) MetadataRegistration.genericInstsCount);
|
||||||
|
|
||||||
|
// Concrete generic method pointers
|
||||||
|
// TODO: Invoker pointers in tableEntry.indices.invokerIndex
|
||||||
|
var genericMethodPointers = image.ReadMappedArray<ulong>(CodeRegistration.genericMethodPointers, (int) CodeRegistration.genericMethodPointersCount);
|
||||||
|
var genericMethodTable = image.ReadMappedArray<Il2CppGenericMethodFunctionsDefinitions>(MetadataRegistration.genericMethodTable, (int) MetadataRegistration.genericMethodTableCount);
|
||||||
|
foreach (var tableEntry in genericMethodTable) {
|
||||||
|
GenericMethodPointers.Add(MethodSpecs[tableEntry.genericMethodIndex], genericMethodPointers[tableEntry.indices.methodIndex]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2017 Perfare - https://github.com/Perfare/Il2CppDumper
|
Copyright 2017 Perfare - https://github.com/Perfare/Il2CppDumper
|
||||||
Copyright 2017-2019 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com
|
Copyright 2017-2020 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com
|
||||||
|
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
*/
|
*/
|
||||||
@@ -216,4 +216,16 @@ namespace Il2CppInspector
|
|||||||
public int classIndexIndex;
|
public int classIndexIndex;
|
||||||
public int methodIndexIndex;
|
public int methodIndexIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class Il2CppGenericMethodFunctionsDefinitions
|
||||||
|
{
|
||||||
|
public int genericMethodIndex;
|
||||||
|
public Il2CppGenericMethodIndices indices;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Il2CppGenericMethodIndices
|
||||||
|
{
|
||||||
|
public int methodIndex;
|
||||||
|
public int invokerIndex;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ namespace Il2CppInspector
|
|||||||
public Dictionary<string, Il2CppCodeGenModule> Modules => Binary.Modules;
|
public Dictionary<string, Il2CppCodeGenModule> Modules => Binary.Modules;
|
||||||
public ulong[] CustomAttributeGenerators => Binary.CustomAttributeGenerators;
|
public ulong[] CustomAttributeGenerators => Binary.CustomAttributeGenerators;
|
||||||
public Il2CppMethodSpec[] MethodSpecs => Binary.MethodSpecs;
|
public Il2CppMethodSpec[] MethodSpecs => Binary.MethodSpecs;
|
||||||
|
public Dictionary<Il2CppMethodSpec, ulong> GenericMethodPointers => Binary.GenericMethodPointers;
|
||||||
|
|
||||||
// TODO: Finish all file access in the constructor and eliminate the need for this
|
// TODO: Finish all file access in the constructor and eliminate the need for this
|
||||||
public IFileFormatReader BinaryImage => Binary.Image;
|
public IFileFormatReader BinaryImage => Binary.Image;
|
||||||
|
|||||||
Reference in New Issue
Block a user