• 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

0.0
/Cpp2IL.Core/Il2CppMethodInfoUsefulOffsets.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using LibCpp2IL;
5

6
namespace Cpp2IL.Core;
7

8
public static class Il2CppMethodInfoUsefulOffsets
9
{
10
    public const int X86_KLASS_OFFSET = 0x00; //TODO
11
    public const int X86_64_KLASS_OFFSET = 0x18;
12

13
    public static readonly List<UsefulOffset> UsefulOffsets =
×
14
    [
×
15
        new UsefulOffset("klass", X86_KLASS_OFFSET, typeof(ushort), true),
×
16

×
17
        //64-bit offsets:
×
18
        new UsefulOffset("klass", X86_64_KLASS_OFFSET, typeof(IntPtr), false)
×
19
    ];
×
20

21
    public static bool IsKlassPtr(uint offset, Il2CppBinary binary)
22
    {
NEW
23
        return GetOffsetName(offset, binary) == "klass";
×
24
    }
25

26
    public static string? GetOffsetName(uint offset, Il2CppBinary binary)
27
    {
NEW
28
        var is32Bit = binary.is32Bit;
×
29

30
        return UsefulOffsets.FirstOrDefault(o => o.is32Bit == is32Bit && o.offset == offset)?.name;
×
31
    }
32

33
    public class UsefulOffset(string name, uint offset, Type type, bool is32Bit)
×
34
    {
35
        public string name = name;
×
36
        public uint offset = offset;
×
37
        public Type type = type;
×
38
        public bool is32Bit = is32Bit;
×
39
    }
40
}
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