Package org.apache.harmony.jpda.tests.framework.jdwp

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


        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();
View Full Code Here


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

        logWriter.println("==> ");
        logWriter.println("==> Receiving events... ");
        CommandPacket event = debuggeeWrapper.vmMirror.receiveEvent();
        ParsedEvent[] parsedEvents = ParsedEvent.parseEventPacket(event);
        byte[] expectedEventKinds
            = {JDWPConstants.EventKind.METHOD_ENTRY, JDWPConstants.EventKind.METHOD_EXIT};
       
        int receivedEventsNumber = parsedEvents.length;
View Full Code Here

        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();
View Full Code Here

        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();
View Full Code Here

        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();
View Full Code Here

       
        logWriter.println("startFrame=" + startFrame
                + "; length=" + length);

        // getting frames of the thread
        CommandPacket packet = new CommandPacket(
                JDWPCommands.ThreadReferenceCommandSet.CommandSetID,
                JDWPCommands.ThreadReferenceCommandSet.FramesCommand);
        packet.setNextValueAsThreadID(threadID);
        packet.setNextValueAsInt(startFrame);
        packet.setNextValueAsInt(length);
        ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet);
        err = reply.getErrorCode();
        if ( err != JDWPConstants.Error.NONE) {
            logWriter.println("\tthreadID=" + threadID
                    + " - " + JDWPConstants.Error.getName(err));
View Full Code Here

        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();
View Full Code Here

     *            id of request for breakpoint
     * @return threadID id of thread, where we stop on breakpoint
     */
    public long waitForBreakpoint(long requestID) {
        // receive event
        CommandPacket event = null;
        event = receiveEvent();

        event.getNextValueAsByte();
        // suspendPolicy - is not used here

        // int numberOfEvents =
        event.getNextValueAsInt();

        long breakpointThreadID = 0;
        ParsedEvent[] eventParsed = ParsedEvent.parseEventPacket(event);

        if (eventParsed.length != 1) {
View Full Code Here

     * @return ReplyPacket for corresponding command
     */
    public ReplyPacket clearBreakpoint(int requestID) {

        // Create new command packet
        CommandPacket commandPacket = new CommandPacket();

        // Set command. "2" - is ID of Clear command in EventRequest Command Set
        commandPacket
                .setCommand(JDWPCommands.EventRequestCommandSet.ClearCommand);

        // Set command set. "15" - is ID of EventRequest Command Set
        commandPacket
                .setCommandSet(JDWPCommands.EventRequestCommandSet.CommandSetID);

        // Set outgoing data
        // Set eventKind
        commandPacket.setNextValueAsByte(JDWPConstants.EventKind.BREAKPOINT);

        // Set suspendPolicy
        commandPacket.setNextValueAsInt(requestID);

        // Send packet
        return checkReply(performCommand(commandPacket));
    }
View Full Code Here

     * @return ReplyPacket for corresponding command
     */
    public ReplyPacket ClearAllBreakpoints() {

        // Create new command packet
        CommandPacket commandPacket = new CommandPacket();

        // Set command. "3" - is ID of ClearAllBreakpoints command in
        // EventRequest Command Set
        commandPacket
                .setCommand(JDWPCommands.EventRequestCommandSet.ClearAllBreakpointsCommand);

        // Set command set. "15" - is ID of EventRequest Command Set
        commandPacket
                .setCommandSet(JDWPCommands.EventRequestCommandSet.CommandSetID);

        // Send packet
        return checkReply(performCommand(commandPacket));
    }
View Full Code Here

TOP

Related Classes of org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket

Copyright © 2018 www.massapicom. 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.