Additional refactoring

This commit is contained in:
Katy Coe
2017-10-23 16:12:40 +02:00
parent 474faa009c
commit 0ab1b75ef4
12 changed files with 117 additions and 190 deletions

View File

@@ -47,7 +47,7 @@ namespace Il2CppInspector
return true;
}
public override uint[] GetSearchLocations() {
public override uint[] GetFunctionTable() {
// Find dynamic section
var dynamic = new elf_32_shdr();
var PT_DYNAMIC = program_table_element.First(x => x.p_type == 2u);

View File

@@ -113,7 +113,7 @@ namespace Il2CppInspector
return true;
}
public override uint[] GetSearchLocations() {
public override uint[] GetFunctionTable() {
Position = pFuncTable;
var functionPointers = new List<uint>();
@@ -139,10 +139,9 @@ namespace Il2CppInspector
return functionPointers.ToArray();
}
public override void FinalizeInit(Il2CppReader il2cpp) {
public override void FinalizeInit(Il2CppBinary il2cpp) {
// Mach-O function pointers have an annoying habit of being 1-off
il2cpp.PtrCodeRegistration.methodPointers =
il2cpp.PtrCodeRegistration.methodPointers.Select(x => x - 1).ToArray();
il2cpp.MethodPointers = il2cpp.MethodPointers.Select(x => x - 1).ToArray();
}
public override uint MapVATR(uint uiAddr) {

View File

@@ -80,7 +80,7 @@ namespace Il2CppInspector
return true;
}
public override uint[] GetSearchLocations() {
public override uint[] GetFunctionTable() {
Position = pFuncTable;
var addrs = new List<uint>();
uint addr;