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

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


     * @param refType
     *            The reference type ID.
     * @return The class object.
     */
    public final long getClassObjectId(long refType) {
        CommandPacket command = new CommandPacket(
                JDWPCommands.ReferenceTypeCommandSet.CommandSetID,
                JDWPCommands.ReferenceTypeCommandSet.ClassObjectCommand);
        command.setNextValueAsReferenceTypeID(refType);
        ReplyPacket reply = checkReply(performCommand(command));
        return reply.getNextValueAsObjectID();
    }
View Full Code Here


     * @param methodID
     *            The method ID
     * @return ReplyPacket for corresponding command.
     */
    public final ReplyPacket getLineTable(long refType, long methodID) {
        CommandPacket command = new CommandPacket(
                JDWPCommands.MethodCommandSet.CommandSetID,
                JDWPCommands.MethodCommandSet.LineTableCommand);
        command.setNextValueAsReferenceTypeID(refType);
        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);
View Full Code Here

        int fieldsCount = fieldIDs.length;
        if (fieldsCount == 0) {
            return null;
        }

        CommandPacket command = new CommandPacket(
                JDWPCommands.ObjectReferenceCommandSet.CommandSetID,
                JDWPCommands.ObjectReferenceCommandSet.GetValuesCommand);
        command.setNextValueAsReferenceTypeID(objectID);
        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];
View Full Code Here

        int fieldsCount = fieldIDs.length;
        if (fieldsCount == 0) {
            return null;
        }

        CommandPacket command = new CommandPacket(
                JDWPCommands.ReferenceTypeCommandSet.CommandSetID,
                JDWPCommands.ReferenceTypeCommandSet.GetValuesCommand);
        command.setNextValueAsReferenceTypeID(refTypeID);
        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];
View Full Code Here

     * @param frameID
     *            The frame ID.
     * @return The 'this' object ID for this frame.
     */
    public final long getThisObject(long threadID, long frameID) {
        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

     * @param classObjectID
     *            The class object ID.
     * @return ReplyPacket for corresponding command
     */
    public final ReplyPacket getReflectedType(long classObjectID) {
        CommandPacket command = new CommandPacket(
                JDWPCommands.ClassObjectReferenceCommandSet.CommandSetID,
                JDWPCommands.ClassObjectReferenceCommandSet.ReflectedTypeCommand);
        command.setNextValueAsClassObjectID(classObjectID);
        return checkReply(performCommand(command));
    }
View Full Code Here

     * @param refTypeID
     *            The reference type ID.
     * @return The JNI signature for the reference type.
     */
    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

     * @param threadID
     *            The thread object ID.
     * @return The thread group ID of this thread.
     */
    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

     * @param threadID
     *            The thread object ID.
     * @return True if a given thread is suspended, false otherwise.
     */
    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

     * @param methodID
     *            The method ID.
     * @return JNI signature of method.
     */
    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();
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.