• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SamboyCoding / Cpp2IL / 23394769930

22 Mar 2026 03:25AM UTC coverage: 35.372% (+0.3%) from 35.085%
23394769930

push

github

SamboyCoding
core: Fix support for nested array custom attribute params

1964 of 6917 branches covered (28.39%)

Branch coverage included in aggregate %.

0 of 1 new or added line in 1 file covered. (0.0%)

279 existing lines in 10 files now uncovered.

4461 of 11247 relevant lines covered (39.66%)

254592.85 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

78.43
/LibCpp2IL/BinaryStructures/Il2CppCodeGenModule.cs
1
using System;
2

3
namespace LibCpp2IL.BinaryStructures;
4

5
public class Il2CppCodeGenModule : ReadableClass
6
{
7
    public ulong moduleName; //pointer
8
    public long methodPointerCount; //ulong
9
    public ulong methodPointers; //pointer
10

11
    //Present in v27.1 and v24.5, but not v27.0
12
    [Version(Min = 27.1f)] [Version(Min = 24.5f, Max = 24.5f)]
13
    public long adjustorThunkCount;
14

15
    [Version(Min = 27.1f)] [Version(Min = 24.5f, Max = 24.5f)]
16
    public ulong adjustorThunks; //Pointer
17

18
    public ulong invokerIndices; //ulong
19
    public ulong reversePInvokeWrapperCount; //ulong
20
    public ulong reversePInvokeWrapperIndices;
21

22
    public long rgctxRangesCount;
23
    public ulong pRgctxRanges;
24

25
    public long rgctxsCount;
26
    public ulong rgctxs;
27
    public ulong debuggerMetadata;
28

29
    [Version(Min = 27, Max = 27.9f)] public ulong customAttributeCacheGenerator; //Removed in v29
30
    [Version(Min = 27)] public ulong moduleInitializer;
31
    [Version(Min = 27)] public ulong staticConstructorTypeIndices;
32
    [Version(Min = 27)] public ulong metadataRegistration; //Per-assembly mode only
33
    [Version(Min = 27)] public ulong codeRegistration; //Per-assembly mode only.
34

35
    private string? _cachedName;
36

37
    internal Il2CppBinary? OwningBinary { get; set; }
3,330✔
38

39
    public string Name
40
    {
41
        get
42
        {
43
            if (_cachedName == null)
3,330✔
44
            {
45
                var binary = OwningBinary ?? LibCpp2IlMain.Binary;
1,665!
46
                if (binary == null)
1,665!
UNCOV
47
                    throw new InvalidOperationException("No binary context available to resolve Il2CppCodeGenModule.Name");
×
48

49
                _cachedName = binary.ReadStringToNull(binary.MapVirtualAddressToRaw(moduleName));
1,665✔
50
            }
51

52
            return _cachedName!;
3,330✔
53
        }
54
    }
55

56
    public Il2CppTokenRangePair[] RGCTXRanges
57
    {
58
        get
59
        {
UNCOV
60
            var binary = OwningBinary ?? LibCpp2IlMain.Binary;
×
UNCOV
61
            if (binary == null)
×
UNCOV
62
                throw new InvalidOperationException("No binary context available to resolve Il2CppCodeGenModule.RGCTXRanges");
×
63

UNCOV
64
            return binary.GetRgctxRangePairsForModule(this);
×
65
        }
66
    }
67

68
    public override void Read(ClassReadingBinaryReader reader)
69
    {
70
        moduleName = reader.ReadNUint();
1,665✔
71
        methodPointerCount = reader.ReadNInt();
1,665✔
72
        methodPointers = reader.ReadNUint();
1,665✔
73

74
        if (IsAtLeast(24.5f) && IsNot(27))
1,665✔
75
        {
76
            adjustorThunkCount = reader.ReadNInt();
1,463✔
77
            adjustorThunks = reader.ReadNUint();
1,463✔
78
        }
79

80
        invokerIndices = reader.ReadNUint();
1,665✔
81
        reversePInvokeWrapperCount = reader.ReadNUint();
1,665✔
82
        reversePInvokeWrapperIndices = reader.ReadNUint();
1,665✔
83
        rgctxRangesCount = reader.ReadNInt();
1,665✔
84
        pRgctxRanges = reader.ReadNUint();
1,665✔
85
        rgctxsCount = reader.ReadNInt();
1,665✔
86
        rgctxs = reader.ReadNUint();
1,665✔
87
        debuggerMetadata = reader.ReadNUint();
1,665✔
88

89
        if (IsAtLeast(27f))
1,665✔
90
        {
91
            if (IsLessThan(29f))
413✔
92
                customAttributeCacheGenerator = reader.ReadNUint();
126✔
93

94
            moduleInitializer = reader.ReadNUint();
413✔
95
            staticConstructorTypeIndices = reader.ReadNUint();
413✔
96
            metadataRegistration = reader.ReadNUint();
413✔
97
            codeRegistration = reader.ReadNUint();
413✔
98
        }
99
    }
1,665✔
100
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc