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

SamboyCoding / Cpp2IL / 13988197905

21 Mar 2025 09:03AM UTC coverage: 23.407% (-3.8%) from 27.187%
13988197905

Pull #426

github

web-flow
Merge 4aa36af61 into 76a9b72af
Pull Request #426: ISIL -> CIL Decompiler

1270 of 7736 branches covered (16.42%)

Branch coverage included in aggregate %.

5 of 1526 new or added lines in 31 files covered. (0.33%)

4 existing lines in 3 files now uncovered.

3383 of 12143 relevant lines covered (27.86%)

107291.03 hits per line

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

0.0
/Cpp2IL.Decompiler/Transforms/ResolveTypeAddresses.cs
1
using Cpp2IL.Decompiler.IL;
2

3
namespace Cpp2IL.Decompiler.Transforms;
4

5
/// <summary>
6
/// Resolves types that are referenced as constant addresses.
7
/// </summary>
8
public class ResolveTypeAddresses : ITransform
9
{
10
    public void Apply(Method method, IContext context)
11
    {
NEW
12
        foreach (var instruction in method.Instructions)
×
13
        {
NEW
14
            for (var i = 0; i < instruction.Operands.Count; i++)
×
15
            {
NEW
16
                var operand = instruction.Operands[i];
×
17

18
                // Not source
NEW
19
                if (!instruction.SourcesAndConstants.Contains(operand))
×
20
                    continue;
21

NEW
22
                if (operand is not MemoryAddress { IsConstant: true } memory) continue;
×
23

NEW
24
                var type = context.GetTypeByAddress((ulong)memory.Addend);
×
25

NEW
26
                if (type != null)
×
NEW
27
                    instruction.Operands[i] = type;
×
28
            }
29
        }
NEW
30
    }
×
31
}
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

© 2025 Coveralls, Inc