Examples of ReplyPacket


Examples of org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket

        // getting the thread group ID
        CommandPacket packet = new CommandPacket(
                JDWPCommands.ThreadReferenceCommandSet.CommandSetID,
                JDWPCommands.ThreadReferenceCommandSet.OwnedMonitorsCommand);
        packet.setNextValueAsThreadID(testedThreadID);
        ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet);
        checkReplyPacket(reply, "ThreadReference::OwnedMonitors command");
       
        int owned = reply.getNextValueAsInt();
        logWriter.println("owned monitors: " + owned);

        String ownerName;
        long ownerThread;

        for (int i =0; i < owned; i++) {
            TaggedObject tobj = reply.getNextValueAsTaggedObject();

            logWriter.println("\t" + i + " tagged-object tag: "
                    + JDWPConstants.Tag.getName(tobj.tag) + "(" + tobj.tag + ") "
                    + "ID: " + tobj.objectID);
           
            packet = new CommandPacket(
                    JDWPCommands.ObjectReferenceCommandSet.CommandSetID,
                    JDWPCommands.ObjectReferenceCommandSet.MonitorInfoCommand);
            packet.setNextValueAsObjectID(tobj.objectID);
            ReplyPacket replyObj = debuggeeWrapper.vmMirror.performCommand(packet);
            checkReplyPacket(replyObj, "ObjectReference::MonitorInfo command");
           
            ownerThread = replyObj.getNextValueAsThreadID();
            logWriter.println("\t\t" + "ownerThread ID:   " + ownerThread);

            ownerName = debuggeeWrapper.vmMirror.getThreadName(ownerThread);
            logWriter.println("\t\t" + "ownerThread name: " + ownerName);
View Full Code Here

Examples of org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket

        logWriter.println("send AllThreads cmd");
        CommandPacket packet = new CommandPacket(
                JDWPCommands.VirtualMachineCommandSet.CommandSetID,
                JDWPCommands.VirtualMachineCommandSet.AllThreadsCommand);
       
        ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet);
        checkReplyPacket(reply, "VirtualMachine::AllThreads command");

        long threadID;
        int threadStatus, suspendStatus;
        String threadName;
        ReplyPacket replyName;

        int threads = reply.getNextValueAsInt();
        logWriter.println("Number of threads = " + threads);
        assertTrue("Number of threads must be > 0", threads > 0);

        for (int i = 0; i < threads; i++) {

            threadID = reply.getNextValueAsThreadID();
            threadName = debuggeeWrapper.vmMirror.getThreadName(threadID);

            packet = new CommandPacket(
                    JDWPCommands.ThreadReferenceCommandSet.CommandSetID,
                    JDWPCommands.ThreadReferenceCommandSet.StatusCommand);
            packet.setNextValueAsReferenceTypeID(threadID);
           
            replyName = debuggeeWrapper.vmMirror.performCommand(packet);
            checkReplyPacket(replyName, "ThreadReference::Status command");

            threadStatus = replyName.getNextValueAsInt();
            suspendStatus = replyName.getNextValueAsInt();

            logWriter.println("\t" + threadID + " "
                    + "\"" + threadName + "\" "
                    + JDWPConstants.ThreadStatus.getName(threadStatus) + " "
                    + JDWPConstants.SuspendStatus.getName(suspendStatus));
View Full Code Here

Examples of org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket

        logWriter.println("send AllThreads cmd");
        CommandPacket packet = new CommandPacket(
                JDWPCommands.VirtualMachineCommandSet.CommandSetID,
                JDWPCommands.VirtualMachineCommandSet.AllThreadsCommand);
       
        ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet);
        checkReplyPacket(reply, "VirtualMachine::AllThreads command");

        long threadID;
        int threadStatus, suspendStatus;
        String threadName;
        int count = 0;
        ReplyPacket replyName;

        int threads = reply.getNextValueAsInt();
        logWriter.println("Number of threads = " + threads);
        assertTrue("Number of threads must be > 0", threads > 0);

        boolean threadStatusFailed = false;
        for (int i = 0; i < threads; i++) {

            threadID = reply.getNextValueAsThreadID();
            threadName = debuggeeWrapper.vmMirror.getThreadName(threadID);

            packet = new CommandPacket(
                    JDWPCommands.ThreadReferenceCommandSet.CommandSetID,
                    JDWPCommands.ThreadReferenceCommandSet.StatusCommand);
            packet.setNextValueAsReferenceTypeID(threadID);
                       
            replyName = debuggeeWrapper.vmMirror.performCommand(packet);
            checkReplyPacket(replyName, "ThreadReference::Status command");

            threadStatus = replyName.getNextValueAsInt();
            suspendStatus = replyName.getNextValueAsInt();

            logWriter.println("\t" + threadID + " "
                    + "\"" + threadName + "\" "
                    + JDWPConstants.ThreadStatus.getName(threadStatus) + " "
                    + JDWPConstants.SuspendStatus.getName(suspendStatus));
View Full Code Here

Examples of org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket

        logWriter.println("send AllThreads cmd");
        CommandPacket packet = new CommandPacket(
                JDWPCommands.VirtualMachineCommandSet.CommandSetID,
                JDWPCommands.VirtualMachineCommandSet.AllThreadsCommand);
       
        ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet);
        checkReplyPacket(reply, "VirtualMachine::AllThreads command");

        long threadID;
        String threadName;
        int count = 0;

        int threads = reply.getNextValueAsInt();
        logWriter.println("Number of threads = " + threads);
        assertTrue("Number of threads must be > 0", threads > 0);

        for (int i = 0; i < threads; i++) {
            threadID = reply.getNextValueAsThreadID();
            threadName = debuggeeWrapper.vmMirror.getThreadName(threadID);

            if (threadName.equals(AllThreadsDebuggee.TESTED_THREAD)) {
                count++;
                logWriter.println("\t" + threadID + " "
View Full Code Here

Examples of org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket

        CommandPacket checkedCommand = new CommandPacket(
                JDWPCommands.ThreadReferenceCommandSet.CommandSetID,
                JDWPCommands.ThreadReferenceCommandSet.StatusCommand);
        checkedCommand.setNextValueAsThreadID(checkedThreadID);
       
        ReplyPacket checkedReply = debuggeeWrapper.vmMirror.performCommand(checkedCommand);
        checkReplyPacket(checkedReply, "ThreadReference.Status command");
       
        int threadStatus = checkedReply.getNextValueAsInt();
        int suspendStatus = checkedReply.getNextValueAsInt();

        logWriter.println("\n=> Returned thread status = 0x" + Integer.toHexString(threadStatus)
                + "(" + JDWPConstants.ThreadStatus.getName(threadStatus) + ")");
        if (threadStatus != JDWPConstants.ThreadStatus.ZOMBIE) {
            finalSyncMessage = JPDADebuggeeSynchronizer.SGNL_CONTINUE;
View Full Code Here

Examples of org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket

        if ( combinedEventsLocation == null ) {
            String failureMessage = "## FAILURE: Can NOT get MethodEntryLocation for method '"
                + methodForEvents + "'";
            printErrorAndFail(failureMessage);
        }
        ReplyPacket reply = debuggeeWrapper.vmMirror.setBreakpoint(combinedEventsLocation);
        int breakpointRequestID = reply.getNextValueAsInt();
        logWriter.println("=> Breakpoint requestID = " + breakpointRequestID);

        logWriter.println("=> Set request for METHOD_ENTRY event in debuggee: "
                + getDebuggeeClassName() + ", method: " + methodForEvents);
        reply = debuggeeWrapper.vmMirror
                .setMethodEntry(methodEntryClassNameRegexp);
        checkReplyPacket(reply, "Set METHOD_ENTRY event");
        int methodEntryRequestID = reply.getNextValueAsInt();
        logWriter.println("=> METHOD_ENTRY requestID = " + methodEntryRequestID);

        logWriter.println("=> Set request for SINGLE_STEP event in class "
                + debuggeeSignature);
        CommandPacket setRequestCommand = new CommandPacket(
                JDWPCommands.EventRequestCommandSet.CommandSetID,
                JDWPCommands.EventRequestCommandSet.SetCommand);
        setRequestCommand
                .setNextValueAsByte(JDWPConstants.EventKind.SINGLE_STEP);
        setRequestCommand.setNextValueAsByte(JDWPConstants.SuspendPolicy.ALL);
        setRequestCommand.setNextValueAsInt(2);
        setRequestCommand.setNextValueAsByte(EventMod.ModKind.Step);
        setRequestCommand.setNextValueAsThreadID(threadID);
        setRequestCommand.setNextValueAsInt(JDWPConstants.StepSize.MIN);
        setRequestCommand.setNextValueAsInt(JDWPConstants.StepDepth.INTO);
        setRequestCommand.setNextValueAsByte(EventMod.ModKind.ClassOnly);
        setRequestCommand.setNextValueAsReferenceTypeID(debuggeeClassID);

        ReplyPacket setRequestReply = debuggeeWrapper.vmMirror
                .performCommand(setRequestCommand);
        checkReplyPacket(setRequestReply, "EventRequest::Set command");
        int stepRequestID = setRequestReply.getNextValueAsInt();
        logWriter.println("=> SINGLE_STEP requestID = " + stepRequestID);

        logWriter.println("");
        logWriter.println("=> Send SGNL_CONTINUE signal to debuggee...");
        synchronizer.sendMessage(JPDADebuggeeSynchronizer.SGNL_CONTINUE);

        // ignore SINGLE_STEP events until receiving combined METHOD_ENTRY,
        // SINGLE_STEP, BREAKPOINT events
        logWriter.println("=> Try to receive and check combined events: "
            + " METHOD_ENTRY, SINGLE_STEP, BREAKPOINT events; ignore single SINGLE_STEP event");
        receiveAndCheckEvents(EXPECTED_EVENTS_ARRAY, combinedEventsLocation);
        if ( eventVmDeathReceived ) {
            logWriter.println("==> testCombinedEvents001 is FINISHing as VM_DEATH is received!");
            return;
        }

        logWriter.println("");
        logWriter.println("=> Clean request for METHOD_ENTRY event...");
        ReplyPacket clearReply = debuggeeWrapper.vmMirror.clearEvent(
                JDWPConstants.EventKind.METHOD_ENTRY, methodEntryRequestID);
        checkReplyPacket(clearReply, "EventRequest::Clear");

        logWriter.println("");
        logWriter.println("=> Clean request for SINGLE_STEP event...");
View Full Code Here

Examples of org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket

            String failureMessage = "## FAILURE: Can NOT get MethodEntryLocation for method '"
                + methodForEvents + "'";
            printErrorAndFail(failureMessage);
        }
       
        ReplyPacket reply = debuggeeWrapper.vmMirror.setBreakpoint(combinedEventsLocation);
        int breakpointRequestID = reply.getNextValueAsInt();
        logWriter.println("=> Breakpoint requestID = " + breakpointRequestID);

        logWriter.println("=> Set request for METHOD_EXIT event in debuggee: "
                + getDebuggeeClassName() + ", method: " + methodForEvents);
        reply = debuggeeWrapper.vmMirror
                .setMethodExit(methodEntryClassNameRegexp);
        checkReplyPacket(reply, "EventRequest::Set command");
        int methodExitRequestID = reply.getNextValueAsInt();
        logWriter.println("=> METHOD_EXIT requestID = " + methodExitRequestID);

        logWriter.println("=> Set request for SINGLE_STEP event in class "
                + debuggeeSignature);
        CommandPacket setRequestCommand = new CommandPacket(
                JDWPCommands.EventRequestCommandSet.CommandSetID,
                JDWPCommands.EventRequestCommandSet.SetCommand);
        setRequestCommand
                .setNextValueAsByte(JDWPConstants.EventKind.SINGLE_STEP);
        setRequestCommand.setNextValueAsByte(JDWPConstants.SuspendPolicy.ALL);
        setRequestCommand.setNextValueAsInt(2);
        setRequestCommand.setNextValueAsByte(EventMod.ModKind.Step);
        setRequestCommand.setNextValueAsThreadID(threadID);
        setRequestCommand.setNextValueAsInt(JDWPConstants.StepSize.MIN);
        setRequestCommand.setNextValueAsInt(JDWPConstants.StepDepth.INTO);
        setRequestCommand.setNextValueAsByte(EventMod.ModKind.ClassOnly);
        setRequestCommand.setNextValueAsReferenceTypeID(debuggeeClassID);

        ReplyPacket setRequestReply = debuggeeWrapper.vmMirror
                .performCommand(setRequestCommand);
        checkReplyPacket(setRequestReply, "EventRequest::Set command");
        int stepRequestID = setRequestReply.getNextValueAsInt();
        logWriter.println("=> SINGLE_STEP requestID = " + stepRequestID);

        logWriter.println("");
        logWriter.println("=> Resume debuggee");
        debuggeeWrapper.vmMirror.resume();

        // ignore SINGLE_STEP events until receiving combined METHOD_EXIT,
        // SINGLE_STEP, BREAKPOINT events
        logWriter.println("=> Try to receive and check combined events: "
            + " METHOD_EXIT, SINGLE_STEP, BREAKPOINT events; ignore single SINGLE_STEP event");
        receiveAndCheckEvents(EXPECTED_EVENTS_ARRAY, combinedEventsLocation);
        if ( eventVmDeathReceived ) {
            logWriter.println("==> testCombinedEvents002 is FINISHing as VM_DEATH is received!");
            return;
        }

        if ( eventMethodExitReceived ) {
            logWriter.println("");
            logWriter.println("=> Clean request for METHOD_EXIT event...");
            ReplyPacket clearReply = debuggeeWrapper.vmMirror.clearEvent(
                    JDWPConstants.EventKind.METHOD_EXIT, methodExitRequestID);
            checkReplyPacket(clearReply, "EventRequest::Clear");
        }

        logWriter.println("");
        logWriter.println("=> Clean request for SINGLE_STEP event...");
        ReplyPacket clearReply = debuggeeWrapper.vmMirror.clearEvent(
                JDWPConstants.EventKind.SINGLE_STEP, stepRequestID);
        checkReplyPacket(clearReply, "EventRequest::Clear");

        logWriter.println("=> Resume debuggee");
        debuggeeWrapper.vmMirror.resume();
View Full Code Here

Examples of org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket

       
        // set requests for events that will be checked

        logWriter.println("=> Set request for METHOD_ENTRY event in debuggee: "
                + getDebuggeeClassName() + ", method: " + methodForEvents);
        ReplyPacket reply = debuggeeWrapper.vmMirror
                .setMethodEntry(methodEntryClassNameRegexp);
        checkReplyPacket(reply, "Set METHOD_ENTRY event");
        int methodEntryRequestID = reply.getNextValueAsInt();
        logWriter.println("=> METHOD_ENTRY requestID = " + methodEntryRequestID);

        logWriter.println("=> Set request for SINGLE_STEP event in class "
                + debuggeeSignature);
        CommandPacket setRequestCommand = new CommandPacket(
                JDWPCommands.EventRequestCommandSet.CommandSetID,
                JDWPCommands.EventRequestCommandSet.SetCommand);
        setRequestCommand
                .setNextValueAsByte(JDWPConstants.EventKind.SINGLE_STEP);
        setRequestCommand.setNextValueAsByte(JDWPConstants.SuspendPolicy.ALL);
        setRequestCommand.setNextValueAsInt(2);
        setRequestCommand.setNextValueAsByte(EventMod.ModKind.Step);
        setRequestCommand.setNextValueAsThreadID(threadID);
        setRequestCommand.setNextValueAsInt(JDWPConstants.StepSize.MIN);
        setRequestCommand.setNextValueAsInt(JDWPConstants.StepDepth.INTO);
        setRequestCommand.setNextValueAsByte(EventMod.ModKind.ClassOnly);
        setRequestCommand.setNextValueAsReferenceTypeID(debuggeeClassID);

        ReplyPacket setRequestReply = debuggeeWrapper.vmMirror
                .performCommand(setRequestCommand);
        checkReplyPacket(setRequestReply, "EventRequest::Set command");
        int stepRequestID = setRequestReply.getNextValueAsInt();
        logWriter.println("=> SINGLE_STEP requestID = " + stepRequestID);

        logWriter.println("");
        logWriter.println("=> Send SGNL_CONTINUE signal to debuggee...");
        synchronizer.sendMessage(JPDADebuggeeSynchronizer.SGNL_CONTINUE);

        Location combinedEventsLocation = getMethodEntryLocation(debuggeeClassID, methodForEvents);
        if ( combinedEventsLocation == null ) {
            String failureMessage = "## FAILURE: Can NOT get MethodEntryLocation for method '"
                + methodForEvents + "'";
            printErrorAndFail(failureMessage);
        }
        // ignore SINGLE_STEP events until receiving combined METHOD_ENTRY,
        // SINGLE_STEP events
        logWriter
                .println("=> Try to receive and check combined events: METHOD_ENTRY, SINGLE_STEP events; ignore single SINGLE_STEP event");
        receiveAndCheckEvents(EXPECTED_EVENTS_ARRAY, combinedEventsLocation);
        if ( eventVmDeathReceived ) {
            logWriter.println("==> testCombinedEvents003 is FINISHing as VM_DEATH is received!");
            return;
        }

        logWriter.println("");
        logWriter.println("=> Clean request for METHOD_ENTRY event...");
        ReplyPacket clearReply = debuggeeWrapper.vmMirror.clearEvent(
                JDWPConstants.EventKind.METHOD_ENTRY, methodEntryRequestID);
        checkReplyPacket(clearReply, "EventRequest::Clear");

        logWriter.println("");
        logWriter.println("=> Clean request for SINGLE_STEP event");
View Full Code Here

Examples of org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket

        // set requests for events that will be checked

        logWriter.println("=> Set request for METHOD_EXIT event in debuggee: "
                + getDebuggeeClassName() + ", method: " + methodForEvents);
        ReplyPacket reply = debuggeeWrapper.vmMirror
                .setMethodExit(methodEntryClassNameRegexp);
        checkReplyPacket(reply, "EventRequest::Set command");
        int methodExitRequestID = reply.getNextValueAsInt();
        logWriter.println("=> METHOD_EXIT requestID = " + methodExitRequestID);

        logWriter.println("=> Set request for SINGLE_STEP event in class "
                + debuggeeSignature);
        CommandPacket setRequestCommand = new CommandPacket(
                JDWPCommands.EventRequestCommandSet.CommandSetID,
                JDWPCommands.EventRequestCommandSet.SetCommand);
        setRequestCommand
                .setNextValueAsByte(JDWPConstants.EventKind.SINGLE_STEP);
        setRequestCommand.setNextValueAsByte(JDWPConstants.SuspendPolicy.ALL);
        setRequestCommand.setNextValueAsInt(2);
        setRequestCommand.setNextValueAsByte(EventMod.ModKind.Step);
        setRequestCommand.setNextValueAsThreadID(threadID);
        setRequestCommand.setNextValueAsInt(JDWPConstants.StepSize.MIN);
        setRequestCommand.setNextValueAsInt(JDWPConstants.StepDepth.INTO);
        setRequestCommand.setNextValueAsByte(EventMod.ModKind.ClassOnly);
        setRequestCommand.setNextValueAsReferenceTypeID(debuggeeClassID);

        ReplyPacket setRequestReply = debuggeeWrapper.vmMirror
                .performCommand(setRequestCommand);
        checkReplyPacket(setRequestReply, "EventRequest::Set command");
        int stepRequestID = setRequestReply.getNextValueAsInt();
        logWriter.println("=> SINGLE_STEP requestID = " + stepRequestID);

        logWriter.println("");
        logWriter.println("=> Resume debuggee");
        debuggeeWrapper.vmMirror.resume();

        Location combinedEventsLocation = getMethodEndLocation(debuggeeClassID, methodForEvents);
        if ( combinedEventsLocation == null ) {
            String failureMessage = "## FAILURE: Can NOT get MethodEntryLocation for method '"
                + methodForEvents + "'";
            printErrorAndFail(failureMessage);
        }
        // ignore SINGLE_STEP events until receiving combined METHOD_EXIT,
        // SINGLE_STEP events
        logWriter
                .println("=> Try to receive and check combined events: METHOD_EXIT, SINGLE_STEP events; ignore single SINGLE_STEP event");
       
        receiveAndCheckEvents(EXPECTED_EVENTS_ARRAY, combinedEventsLocation);
        if ( eventVmDeathReceived ) {
            logWriter.println("==> testCombinedEvents004 is FINISHing as VM_DEATH is received!");
            return;
        }

        if ( eventMethodExitReceived ) {
            logWriter.println("");
            logWriter.println("=> Clean request for METHOD_EXIT event...");
            ReplyPacket clearReply = debuggeeWrapper.vmMirror.clearEvent(
                    JDWPConstants.EventKind.METHOD_EXIT, methodExitRequestID);
            checkReplyPacket(clearReply, "EventRequest::Clear");
        }

        logWriter.println("");
        logWriter.println("=> Clean request for SINGLE_STEP event");
        ReplyPacket clearReply = debuggeeWrapper.vmMirror.clearEvent(
                JDWPConstants.EventKind.SINGLE_STEP, stepRequestID);
        checkReplyPacket(clearReply, "EventRequest::Clear");

        logWriter.println("=> Resume debuggee");
        debuggeeWrapper.vmMirror.resume();
View Full Code Here

Examples of org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket

        if ( combinedEventsLocation == null ) {
            String failureMessage = "## FAILURE: Can NOT get MethodEntryLocation for method '"
                + methodForEvents + "'";
            printErrorAndFail(failureMessage);
        }
        ReplyPacket reply = debuggeeWrapper.vmMirror.setBreakpoint(combinedEventsLocation);
        int breakpointRequestID = reply.getNextValueAsInt();
        logWriter.println("=> Breakpoint requestID = " + breakpointRequestID);


        logWriter.println("=> Set request for METHOD_ENTRY event in debuggee: "
                + getDebuggeeClassName() + ", method: " + methodForEvents);
        reply = debuggeeWrapper.vmMirror
                .setMethodEntry(methodEntryClassNameRegexp);
        checkReplyPacket(reply, "Set METHOD_ENTRY event");
        int methodEntryRequestID = reply.getNextValueAsInt();
        logWriter.println("=> METHOD_ENTRY requestID = " + methodEntryRequestID);

        logWriter.println("");
//        logWriter.println("=> Resume debuggee");
//        debuggeeWrapper.vmMirror.resume();
        synchronizer.sendMessage(JPDADebuggeeSynchronizer.SGNL_CONTINUE);

        // receive and check combined METHOD_ENTRY, BREAKPOINT events
        logWriter
                .println("=> Try to receive and check combined events: METHOD_ENTRY, BREAKPOINT events");
        EventPacket event = debuggeeWrapper.vmMirror.receiveEvent();
        ParsedEvent[] parsedEvents = ParsedEvent.parseEventPacket(event);
        // print all received events
        logWriter.println("=> Events received: " + parsedEvents.length);
        for (int i = 0; i < parsedEvents.length; i++) {
            logWriter.println("");
            logWriter.println("=> Event #" + i + ";");
            logWriter.println("=> EventKind: "
                    + parsedEvents[i].getEventKind()
                    + "["
                    + JDWPConstants.EventKind.getName(parsedEvents[i]
                            .getEventKind()) + "]");
            logWriter
                    .println("=> RequestID: " + parsedEvents[i].getRequestID());
        }
        boolean success = true;
        boolean locationsOK = checkEventsLocation(parsedEvents, combinedEventsLocation);
        if (parsedEvents.length == EXPECTED_EVENTS_COUNT) {
            logWriter.println("");
            logWriter
                    .println("=> Combined events are received. Check events..");
            for (int i = 0; i < parsedEvents.length; i++) {
                boolean isFound = false;
                for (int j = 0; j < EXPECTED_EVENTS_COUNT; j++) {
                    if (parsedEvents[i].getEventKind() == EXPECTED_EVENTS_ARRAY[j]) {
                        EXPECTED_EVENTS_ARRAY[j] = 0;
                        isFound = true;
                        break;
                    }
                }
                if (!isFound) {
                    logWriter
                            .println("##FAILURE: received unexpected event: "
                                    + parsedEvents[i].getEventKind()
                                    + "["
                                    + JDWPConstants.EventKind
                                            .getName(parsedEvents[0]
                                                    .getEventKind()) + "]");
                    success = false;
                }
            }
            if (!success) {
                logWriter.println("");
                logWriter
                        .println("##FAILURE: the following events were not received: ");
                for (int k = 0; k < EXPECTED_EVENTS_COUNT; k++) {
                    if (EXPECTED_EVENTS_ARRAY[k] != 0)
                        logWriter.println("  #"
                                + k
                                + ": "
                                + EXPECTED_EVENTS_ARRAY[k]
                                + "["
                                + JDWPConstants.EventKind
                                        .getName(EXPECTED_EVENTS_ARRAY[k])
                                + "]");
                }
                //DBG__fail("not all expected events were received");
            }
        } else {
            logWriter.println("##FAILURE: received unexpected number of events: "
                    + parsedEvents.length
                    + " instead of "
                    + EXPECTED_EVENTS_COUNT);
            //DBG__fail("received unexpected number of events: " + parsedEvents.length);
               
        }
        if ( (! success) || (! locationsOK) ) {
            logWriter.println("## FAILURE during checking events!");
        }
        logWriter.println("");
        logWriter.println("=> Clean request for METHOD_ENTRY event...");
        ReplyPacket clearReply = debuggeeWrapper.vmMirror.clearEvent(
                JDWPConstants.EventKind.METHOD_ENTRY, methodEntryRequestID);
        checkReplyPacket(clearReply, "EventRequest::Clear");

        logWriter.println("=> Resume debuggee");
        debuggeeWrapper.vmMirror.resume();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.