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

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


     *
     * @return ReplyPacket for corresponding command
     */
    public ReplyPacket dispose() {
        // Create new command packet
        CommandPacket commandPacket = new CommandPacket();
        commandPacket
                .setCommand(JDWPCommands.VirtualMachineCommandSet.DisposeCommand);
        commandPacket
                .setCommandSet(JDWPCommands.VirtualMachineCommandSet.CommandSetID);

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


     *
     * @return ReplyPacket for corresponding command
     */
    public ReplyPacket exit(int exitCode) {
        // Create new command packet
        CommandPacket commandPacket = new CommandPacket();
        commandPacket
                .setCommand(JDWPCommands.VirtualMachineCommandSet.ExitCommand);
        commandPacket
                .setCommandSet(JDWPCommands.VirtualMachineCommandSet.CommandSetID);
        commandPacket.setNextValueAsInt(exitCode);

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

     *
     * @return ReplyPacket for corresponding command
     */
    public ReplyPacket adjustTypeLength() {
        // Create new command packet
        CommandPacket commandPacket = new CommandPacket();
        commandPacket
                .setCommand(JDWPCommands.VirtualMachineCommandSet.IDSizesCommand);
        commandPacket
                .setCommandSet(JDWPCommands.VirtualMachineCommandSet.CommandSetID);

        // Send packet
        ReplyPacket replyPacket = checkReply(performCommand(commandPacket));

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

        checkReplyPacket(reply, "Set CLASS_PREPARE event");
       
        // start loading Class2Prepare class
        synchronizer.sendMessage(JPDADebuggeeSynchronizer.SGNL_CONTINUE);
       
        CommandPacket event = debuggeeWrapper.vmMirror.receiveEvent();
        ParsedEvent[] parsedEvents = ParsedEvent.parseEventPacket(event);
       
        assertEquals("Invalid number of events,", 1, parsedEvents.length);
        assertEquals("Invalid event kind,", JDWPConstants.EventKind.CLASS_PREPARE, parsedEvents[0].getEventKind()
                , JDWPConstants.EventKind.getName(JDWPConstants.EventKind.CLASS_PREPARE)
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

     * @return ReplyPacket useless, already parsed reply packet.
     */
    public ReplyPacket capabilities() {

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

        // Set command. "17" - is ID of CapabilitiesNew command in
        // VirtualMachine Command Set
        commandPacket
                .setCommand(JDWPCommands.VirtualMachineCommandSet.CapabilitiesNewCommand);

        // Set command set. "1" - is ID of VirtualMachine Command Set
        commandPacket
                .setCommandSet(JDWPCommands.VirtualMachineCommandSet.CommandSetID);

        // Send packet
        ReplyPacket replyPacket = checkReply(performCommand(commandPacket));
       
View Full Code Here

     * Resumes debuggee VM.
     *
     * @return ReplyPacket for corresponding command
     */
    public ReplyPacket resume() {
        CommandPacket commandPacket = new CommandPacket(
                JDWPCommands.VirtualMachineCommandSet.CommandSetID,
                JDWPCommands.VirtualMachineCommandSet.ResumeCommand);

        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.