* Add new test assemblies for C# features
Three of these test assemblies go over several important features of C#,
organized by C# language version. PartialGenericTypes stresses closed
and partially closed generics. Finally, VTablesAndLayout tests the
layout of classes when translated to C++, and also contains code which
calls vtable and interface functions to test reverse engineering.
* Tests: Update .csproj
* Tests: Update .csproj
Co-authored-by: Katy Coe <djkaty@users.noreply.github.com>
In 2019.3.7f1, the following fields were added to
Il2CppCodeRegistration:
uint32_t interopDataCount;
Il2CppInteropData* interopData;
+ uint32_t windowsRuntimeFactoryCount;
+ Il2CppWindowsRuntimeFactoryTableEntry* windowsRuntimeFactoryTable;
uint32_t codeGenModulesCount;
const Il2CppCodeGenModule** codeGenModules;
These two fields overlap the old codeGenModules fields, causing failures.
The current fix is simply to bump the version to 24.3 if these fields are
detected in order to get the correct codeGenModules pointer. Long term, a
better detection mechanism (probably based on examining the name string
pointer in codeGenModules[0]) will be necessary. However, this is pending
more samples of 2019.3.7+ for testing.
The logic for fieldOffsetsArePointers was always reading 32-bit units
even on 64-bits. When fieldOffsetsArePointers is true, fieldOffsets is
declared as int32_t**, so each element *must* be a pointer and therefore
word-sized (64 bits on 64-bit machines). So it doesn't make sense to
only read 32-bit words for this test.
This fixes metadata extraction for 64-bit builds from Il2Cpp versions
5.3.7f1, 5.3.8f2, 5.4.1f1, 5.4.2f2, 5.4.3f1, 5.4.4f1, 5.4.5f1 and
5.4.6f3. Notably, 5.4.0f3 is an unusual outlier which uses int32_t * for
fieldOffsets.
According to the headers I have available, Unity v5.3.2f1 (metadata 19)
lacks the referencedAssemblies{Offset,Count} fields in
Il2CppGlobalMetadataHeader. These appear to have been added some time
between that version and 5.3.3f1 (metadata 20).
Changing these fields makes the Inspector work properly on the output from
Il2Cpp from Unity v5.3.2f1.
This change causes the Inspector to properly parse DLLs generated with
Il2Cpp versions 5.3.0f4 through 5.3.4f1 (excluding 5.3.2f1, which is a
separate problem).