IDA: Produced typed RuntimeInvoker methods
This commit is contained in:
@@ -108,9 +108,7 @@ typedef __int64 int64_t;
|
|||||||
|
|
||||||
writeSectionHeader("Method.Invoke thunks");
|
writeSectionHeader("Method.Invoke thunks");
|
||||||
foreach (var method in model.ILModel.MethodInvokers.Where(m => m != null)) {
|
foreach (var method in model.ILModel.MethodInvokers.Where(m => m != null)) {
|
||||||
var address = method.VirtualAddress.Start;
|
writeTypedName(method.VirtualAddress.Start, method.ToString(), method.Name);
|
||||||
writeName(address, method.Name);
|
|
||||||
writeComment(address, method);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,10 +53,10 @@ namespace Il2CppInspector.Reflection
|
|||||||
_ => type
|
_ => type
|
||||||
};
|
};
|
||||||
|
|
||||||
public string Name => $"RunTimeInvoker_{!IsStatic}{ReturnType.BaseName}_" + string.Join("_", ParameterTypes.Select(p => p.BaseName));
|
public string Name => $"RuntimeInvoker_{!IsStatic}{ReturnType.BaseName.ToCIdentifier()}_" + string.Join("_", ParameterTypes.Select(p => p.BaseName.ToCIdentifier()));
|
||||||
|
|
||||||
// Display as a C++ method signature
|
// Display as a C++ method signature; MethodInfo* is the same as RuntimeMethod* (see codegen/il2cpp-codegen-metadata.h)
|
||||||
public string Signature => Name + "(Il2CppMethodPointer pointer, const RuntimeMethod* methodMetadata, void* obj, void** args)";
|
public string Signature => $"void* {Name}(Il2CppMethodPointer pointer, const MethodInfo* methodMetadata, void* obj, void** args)";
|
||||||
|
|
||||||
public override string ToString() => Signature;
|
public override string ToString() => Signature;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user