예제 #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"));
            }
        }