• 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.Core/InstructionSets/ArmV7InstructionSet.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using Cpp2IL.Core.Api;
6
using Cpp2IL.Core.Graphs;
7
using Cpp2IL.Core.Il2CppApiFunctions;
8
using Cpp2IL.Core.ISIL;
9
using Cpp2IL.Core.Model.Contexts;
10
using Cpp2IL.Core.Utils;
11
using Cpp2IL.Decompiler.IL;
12

13
namespace Cpp2IL.Core.InstructionSets;
14

15
public class ArmV7InstructionSet : Cpp2IlInstructionSet
16
{
17
    public override Memory<byte> GetRawBytesForMethod(MethodAnalysisContext context, bool isAttributeGenerator)
18
    {
19
        if (ArmV7Utils.TryGetMethodBodyBytesFast(context.UnderlyingPointer, context is AttributeGeneratorMethodAnalysisContext) is { } ret)
×
20
            return ret;
×
21

22
        var instructions = ArmV7Utils.GetArmV7MethodBodyAtVirtualAddress(context.UnderlyingPointer);
×
23

24
        return instructions.SelectMany(i => i.Bytes).ToArray();
×
25
    }
26

27
    public override List<InstructionSetIndependentInstruction> GetIsilFromMethod(MethodAnalysisContext context)
28
    {
29
        return [];
×
30
    }
31

32
    public override List<Instruction> GetDecompilerIlFromMethod(MethodAnalysisContext context, out List<object> ilParams)
33
    {
NEW
34
        ilParams = [];
×
NEW
35
        return [];
×
36
    }
37

38
    public override BaseKeyFunctionAddresses CreateKeyFunctionAddressesInstance()
39
    {
40
        //TODO Fix
41
        return new Arm64KeyFunctionAddresses();
×
42
    }
43

44
    public override string PrintAssembly(MethodAnalysisContext context)
45
    {
46
        var sb = new StringBuilder();
×
47

48
        var instructions = ArmV7Utils.GetArmV7MethodBodyAtVirtualAddress(context.UnderlyingPointer);
×
49

50
        var first = true;
×
51
        foreach (var instruction in instructions)
×
52
        {
53
            if (!first)
×
54
                sb.AppendLine();
×
55

56
            first = false;
×
57
            sb.Append("0x").Append(instruction.Address.ToString("X")).Append(" ").Append(instruction.Mnemonic).Append(" ").Append(instruction.Operand);
×
58
        }
59

60
        return sb.ToString();
×
61
    }
62
}
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