コード例 #1
0
 public BasicBlockUtil(StringBuilder log, MethodBodyEx body, IIndexable <int> basicBlockStartOffsets)
 {
     Log       = log;
     this.body = body;
     _basicBlockStartOffsets = basicBlockStartOffsets;
     PrintInstructions(body);
 }
コード例 #2
0
 public BasicBlockUtil(StringBuilder log, MethodBodyEx body, IIndexable<int> basicBlockStartOffsets)
 {
     Log = log;
     this.body = body;
     _basicBlockStartOffsets = basicBlockStartOffsets;
     PrintInstructions(body);
 }
コード例 #3
0
 private void PrintInstructions(MethodBodyEx body)
 {
     Instruction instruction;
     body.TryGetInstruction(0, out instruction);
     int nextOffset = instruction.NextOffset;
     Log.AppendLine("instruction: " + instruction.Offset.ToString("x") + " code: " + instruction.OpCode +
                    " next: " + nextOffset.ToString("x"));
     while (body.TryGetInstruction(nextOffset, out instruction))
     {
         nextOffset = instruction.NextOffset;
         Log.AppendLine("instruction: " + instruction.Offset.ToString("x") + " code: " + instruction.OpCode +
                        " next: " + nextOffset.ToString("x"));
     }
 }
コード例 #4
0
        private void PrintInstructions(MethodBodyEx body)
        {
            Instruction instruction;

            body.TryGetInstruction(0, out instruction);
            int nextOffset = instruction.NextOffset;

            Log.AppendLine("instruction: " + instruction.Offset.ToString("x") + " code: " + instruction.OpCode +
                           " next: " + nextOffset.ToString("x"));
            while (body.TryGetInstruction(nextOffset, out instruction))
            {
                nextOffset = instruction.NextOffset;
                Log.AppendLine("instruction: " + instruction.Offset.ToString("x") + " code: " + instruction.OpCode +
                               " next: " + nextOffset.ToString("x"));
            }
        }