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

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


        command.setNextValueAsMethodID(methodID);
        // ReplyPacket reply =
        // debuggeeWrapper.vmMirror.checkReply(debuggeeWrapper.vmMirror.performCommand(command));
        // it is impossible to obtain line table information from native
        // methods, so reply checking is not performed
        ReplyPacket reply = performCommand(command);
        if (reply.getErrorCode() != JDWPConstants.Error.NONE) {
            if (reply.getErrorCode() == JDWPConstants.Error.NATIVE_METHOD) {
                return reply;
            }
        }

        return checkReply(reply);
View Full Code Here


        command.setNextValueAsInt(fieldsCount);
        for (int i = 0; i < fieldsCount; i++) {
            command.setNextValueAsFieldID(fieldIDs[i]);
        }

        ReplyPacket reply = checkReply(performCommand(command));
        reply.getNextValueAsInt(); // fields returned, is not used
        Value[] values = new Value[fieldsCount];
        for (int i = 0; i < fieldsCount; i++) {
            values[i] = reply.getNextValueAsValue();
        }

        return values;
    }
View Full Code Here

        command.setNextValueAsInt(fieldsCount);
        for (int i = 0; i < fieldsCount; i++) {
            command.setNextValueAsFieldID(fieldIDs[i]);
        }

        ReplyPacket reply = checkReply(performCommand(command));
        reply.getNextValueAsInt(); // fields returned, is not used
        Value[] values = new Value[fieldsCount];
        for (int i = 0; i < fieldsCount; i++) {
            values[i] = reply.getNextValueAsValue();
        }

        return values;
    }
View Full Code Here

        CommandPacket command = new CommandPacket(
                JDWPCommands.StackFrameCommandSet.CommandSetID,
                JDWPCommands.StackFrameCommandSet.ThisObjectCommand);
        command.setNextValueAsThreadID(threadID);
        command.setNextValueAsFrameID(frameID);
        ReplyPacket reply = checkReply(performCommand(command));
        TaggedObject taggedObject = reply.getNextValueAsTaggedObject();
        return taggedObject.objectID;
    }
View Full Code Here

            for (int i = 0; i < superClassFields.size(); i++) {
                fields.add(superClassFields.toArray()[i]);
            }
        }

        ReplyPacket reply = getFieldsInClass(classID);
        int fieldsCount = reply.getNextValueAsInt();
        for (int i = 0; i < fieldsCount; i++) {
            Field field = new Field(reply.getNextValueAsFieldID(), classID,
                    reply.getNextValueAsString(), reply.getNextValueAsString(),
                    reply.getNextValueAsInt());
            fields.add(field);
        }

        return fields;
    }
View Full Code Here

    public final String getReferenceTypeSignature(long refTypeID) {
        CommandPacket command = new CommandPacket(
                JDWPCommands.ReferenceTypeCommandSet.CommandSetID,
                JDWPCommands.ReferenceTypeCommandSet.SignatureCommand);
        command.setNextValueAsReferenceTypeID(refTypeID);
        ReplyPacket reply = checkReply(performCommand(command));
        return reply.getNextValueAsString();
    }
View Full Code Here

    public final long getThreadGroupID(long threadID) {
        CommandPacket command = new CommandPacket(
                JDWPCommands.ThreadReferenceCommandSet.CommandSetID,
                JDWPCommands.ThreadReferenceCommandSet.ThreadGroupCommand);
        command.setNextValueAsThreadID(threadID);
        ReplyPacket reply = checkReply(performCommand(command));
        return reply.getNextValueAsThreadGroupID();
    }
View Full Code Here

    public final boolean isThreadSuspended(long threadID) {
        CommandPacket command = new CommandPacket(
                JDWPCommands.ThreadReferenceCommandSet.CommandSetID,
                JDWPCommands.ThreadReferenceCommandSet.StatusCommand);
        command.setNextValueAsThreadID(threadID);
        ReplyPacket reply = checkReply(performCommand(command));
        reply.getNextValueAsInt(); // the thread's status; is not used
        return reply.getNextValueAsInt() == JDWPConstants.SuspendStatus.SUSPEND_STATUS_SUSPENDED;
    }
View Full Code Here

    public final String getMethodSignature(long classID, long methodID) {
        CommandPacket command = new CommandPacket(
                JDWPCommands.ReferenceTypeCommandSet.CommandSetID,
                JDWPCommands.ReferenceTypeCommandSet.MethodsCommand);
        command.setNextValueAsReferenceTypeID(classID);
        ReplyPacket reply = checkReply(performCommand(command));
        int methods = reply.getNextValueAsInt();
        String value = null;
        for (int i = 0; i < methods; i++) {
            long mID = reply.getNextValueAsMethodID();
            reply.getNextValueAsString(); // name of the method; is not used
            String methodSign = reply.getNextValueAsString();
            reply.getNextValueAsInt();
            if (mID == methodID) {
                value = methodSign;
                value = value.replaceAll("/", ".");
                int lastRoundBracketIndex = value.lastIndexOf(")");
                value = value.substring(0, lastRoundBracketIndex + 1);
View Full Code Here

    public final String getStringValue(long objectID) {
        CommandPacket command = new CommandPacket(
                JDWPCommands.StringReferenceCommandSet.CommandSetID,
                JDWPCommands.StringReferenceCommandSet.ValueCommand);
        command.setNextValueAsObjectID(objectID);
        ReplyPacket reply = checkReply(performCommand(command));
        return reply.getNextValueAsString();
    }
View Full Code Here

TOP

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

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.