diff --git a/org.ntlab.reverseDebugger/src/org/ntlab/debuggingControl/DebuggingControlAction.java b/org.ntlab.reverseDebugger/src/org/ntlab/debuggingControl/DebuggingControlAction.java index 00d9271..8ca525e 100644 --- a/org.ntlab.reverseDebugger/src/org/ntlab/debuggingControl/DebuggingControlAction.java +++ b/org.ntlab.reverseDebugger/src/org/ntlab/debuggingControl/DebuggingControlAction.java @@ -7,6 +7,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Scanner; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IWorkspaceRoot; @@ -149,7 +150,7 @@ methodName = "getId"; Value threadIdValue = callInstanceMethod(vm, thread, methodName, thread); StringReference threadId = vm.mirrorOf(String.valueOf(((LongValue)threadIdValue).value())); - System.out.print("threadId = " + threadId); // �擾����ThreadId�̊m�F�p + System.out.println("threadId = " + threadId); // �擾����ThreadId�̊m�F�p // threadId�ɑΉ�����ThreadInstance���擾 className = "TraceJSON"; @@ -177,24 +178,28 @@ // ThreadInstance������curMethodExecution���擾 String methodName = "getCurrentMethodExecution"; Value methodExecution = callInstanceMethod(vm, thread, methodName, (ObjectReference)threadInstance); - + Scanner scanner = new Scanner(System.in); + // curMethodExecution�̍ŏI�X�e�[�g�����g���擾 methodName = "getStatements"; Value statements = callInstanceMethod(vm, thread, methodName, (ObjectReference)methodExecution); methodName = "size"; int statementsSize = ((IntegerValue)callInstanceMethod(vm, thread, methodName, (ObjectReference)statements)).value(); - Value lastIndex = vm.mirrorOf(statementsSize - 1); + System.out.print("(input)statementOrder? -> "); + int order = scanner.nextInt(); + Value statementOrder = vm.mirrorOf((order >= 0 && order < statementsSize) ? order : statementsSize - 1); methodName = "get"; - Value lastStatement = callInstanceMethod(vm, thread, methodName, (ObjectReference)statements, lastIndex); + Value statement = callInstanceMethod(vm, thread, methodName, (ObjectReference)statements, statementOrder); // �G�C���A�X�����ɗp����objId��tp���擾 String packageName = "org.ntlab.traceCollector.tracer.trace"; String className = "TraceJSON"; methodName = "findValueObjId"; - Value occurrenceEXP = vm.mirrorOf(1); // �����͊m�F�������p�^�[���ɉ����Ď蓮�ŕς�����𓾂Ȃ� - Value valueObjId = callStaticMethod(vm, thread, packageName, className, methodName, lastStatement, occurrenceEXP); + System.out.print("(input)occurrenceEXP? -> "); + Value occurrenceEXP = vm.mirrorOf(scanner.nextInt()); + Value valueObjId = callStaticMethod(vm, thread, packageName, className, methodName, statement, occurrenceEXP); methodName = "getTracePoint"; - Value tp = callInstanceMethod(vm, thread, methodName, (ObjectReference)methodExecution, lastIndex); + Value tp = callInstanceMethod(vm, thread, methodName, (ObjectReference)methodExecution, statementOrder); // �X�^�[�g�ƂȂ�G�C���A�X�𐶐� methodName = "getAlias";