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

SamboyCoding / Cpp2IL / 25641285720

10 May 2026 10:18PM UTC coverage: 35.104% (-0.2%) from 35.33%
25641285720

Pull #542

github

web-flow
Merge 9249bcb5b into 6af99f218
Pull Request #542: Remove static mutable state from LibCpp2IL 2: Electric Boogaloo

1877 of 6693 branches covered (28.04%)

Branch coverage included in aggregate %.

303 of 569 new or added lines in 66 files covered. (53.25%)

12 existing lines in 11 files now uncovered.

4394 of 11171 relevant lines covered (39.33%)

268486.35 hits per line

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

97.3
/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
    public string Name
38
    {
39
        get
40
        {
41
            if (_cachedName == null)
3,330✔
42
            {
43
                var binary = OwningContext.Binary;
1,665✔
44
                _cachedName = binary.ReadStringToNull(binary.MapVirtualAddressToRaw(moduleName));
1,665✔
45
            }
46

47
            return _cachedName!;
3,330✔
48
        }
49
    }
50

NEW
51
    public Il2CppTokenRangePair[] RGCTXRanges => OwningContext.Binary.GetRgctxRangePairsForModule(this);
×
52

53
    public override void Read(ClassReadingBinaryReader reader)
54
    {
55
        moduleName = reader.ReadNUint();
1,665✔
56
        methodPointerCount = reader.ReadNInt();
1,665✔
57
        methodPointers = reader.ReadNUint();
1,665✔
58

59
        if (IsAtLeast(24.5f) && IsNot(27))
1,665✔
60
        {
61
            adjustorThunkCount = reader.ReadNInt();
1,463✔
62
            adjustorThunks = reader.ReadNUint();
1,463✔
63
        }
64

65
        invokerIndices = reader.ReadNUint();
1,665✔
66
        reversePInvokeWrapperCount = reader.ReadNUint();
1,665✔
67
        reversePInvokeWrapperIndices = reader.ReadNUint();
1,665✔
68
        rgctxRangesCount = reader.ReadNInt();
1,665✔
69
        pRgctxRanges = reader.ReadNUint();
1,665✔
70
        rgctxsCount = reader.ReadNInt();
1,665✔
71
        rgctxs = reader.ReadNUint();
1,665✔
72
        debuggerMetadata = reader.ReadNUint();
1,665✔
73

74
        if (IsAtLeast(27f))
1,665✔
75
        {
76
            if (IsLessThan(29f))
413✔
77
                customAttributeCacheGenerator = reader.ReadNUint();
126✔
78

79
            moduleInitializer = reader.ReadNUint();
413✔
80
            staticConstructorTypeIndices = reader.ReadNUint();
413✔
81
            metadataRegistration = reader.ReadNUint();
413✔
82
            codeRegistration = reader.ReadNUint();
413✔
83
        }
84
    }
1,665✔
85
}
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