classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] [PATCH/JDWP] Update gnu.classpath.jdwp.processor


From: Keith Seitz
Subject: [cp-patches] [PATCH/JDWP] Update gnu.classpath.jdwp.processor
Date: Thu, 25 Aug 2005 15:11:45 -0700
User-agent: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720)

Hi,

I've committed the attached patch which updates all the CommandSets in the processor package with the new VMIdManager and EventManager APIs. It also removes all the duplicated private variables for these things and adds them to a base class.

Keith

ChangeLog
2005-08-25  Keith Seitz  <address@hidden>

        * gnu/classpath/jdwp/processor/CommandSet.java (CommandSet): Make
        an abstract class.
        Add protected variables for VMIdManager and VMVirtualMachine.
        (runCommand): Make abstract.
        * gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java
        (ArrayReferenceCommandSet): Derive from CommandSet instead of
        implementing it. Remove private hooks to ID manager and VM.
        Update all VMIdManager and EventManager API calls.
        * gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java
        (ArrayTypeCommandSet): Likewise.
        * gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java
        (ClassLoaderReferenceCommandSet): Likewise.
        * gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java
        (ClassObjectReferenceCommandSet): Likewise.
        * gnu/classpath/jdwp/processor/ClassTypeCommandSet.java
        (ClassTypeCommandSet): Likewise.
        * gnu/classpath/jdwp/processor/EventRequestCommandSet.java
        (EventRequestCommandSet): Likewise.
        * gnu/classpath/jdwp/processor/FieldCommandSet.java
        (FieldCommandSet): Likewise.
        * gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java
        (InterfaceTypeCommandSet): Likewise.
        * gnu/classpath/jdwp/processor/MethodCommandSet.java
        (MethodCommandSet): Likewise.
        * gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java
        (ObjectReferenceCommandSet): Likewise.
        * gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
        (ReferenceTypeCommandSet): Likewise.
        * gnu/classpath/jdwp/processor/StackFrameCommandSet.java
        (StackFrameCommandSet): Likewise.
        * gnu/classpath/jdwp/processor/StringReferenceCommandSet.java
        (StringReferenceCommandSet): Likewise.
        * gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java
        (ThreadGroupReferenceCommandSet.java): Likewise.
        * gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java
        (ThreadReferenceCommandSet): Likewise.
        * gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
        (VirtualMachineCommandSet): Likewise.

        * gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java
        (executeStatus): Fix constant name.
        * gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
        (executeDisposeObjects): Don't do anything yet -- this
        is unimplemented.
Index: gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java,v
retrieving revision 1.1
diff -u -p -r1.1 ArrayReferenceCommandSet.java
--- gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java  27 Jul 2005 
00:34:34 -0000      1.1
+++ gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java  25 Aug 2005 
22:05:37 -0000
@@ -40,13 +40,11 @@ exception statement from your version. *
 
 package gnu.classpath.jdwp.processor;
 
-import gnu.classpath.jdwp.Jdwp;
 import gnu.classpath.jdwp.JdwpConstants;
 import gnu.classpath.jdwp.exception.InvalidObjectException;
 import gnu.classpath.jdwp.exception.JdwpException;
 import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
 import gnu.classpath.jdwp.exception.NotImplementedException;
-import gnu.classpath.jdwp.id.IdManager;
 import gnu.classpath.jdwp.id.ObjectId;
 import gnu.classpath.jdwp.util.Value;
 
@@ -60,11 +58,9 @@ import java.nio.ByteBuffer;
  * 
  * @author Aaron Luchko <address@hidden>
  */
-public class ArrayReferenceCommandSet implements CommandSet
+public class ArrayReferenceCommandSet
+  extends CommandSet
 {
-  // Manages all the different ids that are assigned by jdwp
-  private final IdManager idMan = Jdwp.getIdManager();
-
   public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
     throws JdwpException
   {
@@ -98,7 +94,7 @@ public class ArrayReferenceCommandSet im
   private void executeLength(ByteBuffer bb, DataOutputStream os)
     throws InvalidObjectException, IOException
   {
-    ObjectId oid = idMan.readId(bb);
+    ObjectId oid = idMan.readObjectId(bb);
     Object array = oid.getObject();
     os.writeInt(Array.getLength(array));
   }
@@ -106,7 +102,7 @@ public class ArrayReferenceCommandSet im
   private void executeGetValues(ByteBuffer bb, DataOutputStream os)
     throws JdwpException, IOException
   {
-    ObjectId oid = idMan.readId(bb);
+    ObjectId oid = idMan.readObjectId(bb);
     Object array = oid.getObject();
     int first = bb.getInt();
     int length = bb.getInt();
@@ -164,7 +160,7 @@ public class ArrayReferenceCommandSet im
   private void executeSetValues(ByteBuffer bb, DataOutputStream os)
     throws IOException, JdwpException
   {
-    ObjectId oid = idMan.readId(bb);
+    ObjectId oid = idMan.readObjectId(bb);
     Object array = oid.getObject();
     int first = bb.getInt();
     int length = bb.getInt();
Index: gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java,v
retrieving revision 1.1
diff -u -p -r1.1 ArrayTypeCommandSet.java
--- gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java       22 Jul 2005 
15:29:02 -0000      1.1
+++ gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java       25 Aug 2005 
22:05:37 -0000
@@ -38,12 +38,10 @@ exception statement from your version. *
 
 package gnu.classpath.jdwp.processor;
 
-import gnu.classpath.jdwp.Jdwp;
 import gnu.classpath.jdwp.JdwpConstants;
 import gnu.classpath.jdwp.exception.JdwpException;
 import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
 import gnu.classpath.jdwp.exception.NotImplementedException;
-import gnu.classpath.jdwp.id.IdManager;
 import gnu.classpath.jdwp.id.ObjectId;
 import gnu.classpath.jdwp.id.ReferenceTypeId;
 
@@ -57,11 +55,9 @@ import java.nio.ByteBuffer;
  * 
  * @author Aaron Luchko <address@hidden>
  */
-public class ArrayTypeCommandSet implements CommandSet
+public class ArrayTypeCommandSet
+  extends CommandSet
 {
-  // Manages all the different ids that are assigned by jdwp
-  private final IdManager idMan = Jdwp.getIdManager();
-
   public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
     throws JdwpException
   {
@@ -98,7 +94,7 @@ public class ArrayTypeCommandSet impleme
 
     int length = bb.getInt();
     Object newArray = Array.newInstance(componentType, length);
-    ObjectId oid = idMan.getId(newArray);
+    ObjectId oid = idMan.getObjectId(newArray);
 
     // Since this array isn't referenced anywhere we'll disable garbage
     // collection on it so it's still around when the debugger gets back to it.
Index: gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java,v
retrieving revision 1.2
diff -u -p -r1.2 ClassLoaderReferenceCommandSet.java
--- gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java    24 Aug 
2005 22:57:07 -0000      1.2
+++ gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java    25 Aug 
2005 22:05:37 -0000
@@ -40,13 +40,10 @@ exception statement from your version. *
 
 package gnu.classpath.jdwp.processor;
 
-import gnu.classpath.jdwp.IVirtualMachine;
-import gnu.classpath.jdwp.Jdwp;
 import gnu.classpath.jdwp.JdwpConstants;
 import gnu.classpath.jdwp.exception.JdwpException;
 import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
 import gnu.classpath.jdwp.exception.NotImplementedException;
-import gnu.classpath.jdwp.id.IdManager;
 import gnu.classpath.jdwp.id.ObjectId;
 import gnu.classpath.jdwp.id.ReferenceTypeId;
 
@@ -61,14 +58,9 @@ import java.util.Iterator;
  * 
  * @author Aaron Luchko <address@hidden>
  */
-public class ClassLoaderReferenceCommandSet implements CommandSet
+public class ClassLoaderReferenceCommandSet
+  extends CommandSet
 {
-  // Our hook into the jvm
-  private final IVirtualMachine vm = Jdwp.getIVirtualMachine();
-
-  // Manages all the different ids that are assigned by jdwp
-  private final IdManager idMan = Jdwp.getIdManager();
-
   public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
       throws JdwpException
   {
@@ -99,7 +91,7 @@ public class ClassLoaderReferenceCommand
   public void executeVisibleClasses(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ObjectId oId = idMan.readId(bb);
+    ObjectId oId = idMan.readObjectId(bb);
     ClassLoader cl = (ClassLoader) oId.getObject();
     ArrayList loadRequests = vm.getLoadRequests(cl);
     os.writeInt(loadRequests.size());
Index: gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java,v
retrieving revision 1.1
diff -u -p -r1.1 ClassObjectReferenceCommandSet.java
--- gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java    20 Jul 
2005 18:04:42 -0000      1.1
+++ gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java    25 Aug 
2005 22:05:37 -0000
@@ -39,12 +39,10 @@ exception statement from your version. *
 
 package gnu.classpath.jdwp.processor;
 
-import gnu.classpath.jdwp.Jdwp;
 import gnu.classpath.jdwp.JdwpConstants;
 import gnu.classpath.jdwp.exception.JdwpException;
 import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
 import gnu.classpath.jdwp.exception.NotImplementedException;
-import gnu.classpath.jdwp.id.IdManager;
 import gnu.classpath.jdwp.id.ObjectId;
 import gnu.classpath.jdwp.id.ReferenceTypeId;
 
@@ -57,11 +55,9 @@ import java.nio.ByteBuffer;
  * 
  * @author Aaron Luchko <address@hidden>
  */
-public class ClassObjectReferenceCommandSet implements CommandSet
+public class ClassObjectReferenceCommandSet
+  extends CommandSet
 {
-  // Manages all the different ids that are assigned by jdwp
-  private final IdManager idMan = Jdwp.getIdManager();
-
   public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
     throws JdwpException
   {
@@ -89,7 +85,7 @@ public class ClassObjectReferenceCommand
   public void executeReflectedType(ByteBuffer bb, DataOutputStream os)
     throws JdwpException, IOException
   {
-    ObjectId oid = idMan.readId(bb);
+    ObjectId oid = idMan.readObjectId(bb);
     Class clazz = (Class) oid.getObject();
 
     // The difference between a ClassObjectId and a ReferenceTypeId is one is
Index: gnu/classpath/jdwp/processor/ClassTypeCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/ClassTypeCommandSet.java,v
retrieving revision 1.2
diff -u -p -r1.2 ClassTypeCommandSet.java
--- gnu/classpath/jdwp/processor/ClassTypeCommandSet.java       24 Aug 2005 
22:57:07 -0000      1.2
+++ gnu/classpath/jdwp/processor/ClassTypeCommandSet.java       25 Aug 2005 
22:05:37 -0000
@@ -40,14 +40,11 @@ exception statement from your version. *
 
 package gnu.classpath.jdwp.processor;
 
-import gnu.classpath.jdwp.IVirtualMachine;
-import gnu.classpath.jdwp.Jdwp;
 import gnu.classpath.jdwp.JdwpConstants;
 import gnu.classpath.jdwp.exception.InvalidFieldException;
 import gnu.classpath.jdwp.exception.JdwpException;
 import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
 import gnu.classpath.jdwp.exception.NotImplementedException;
-import gnu.classpath.jdwp.id.IdManager;
 import gnu.classpath.jdwp.id.ObjectId;
 import gnu.classpath.jdwp.id.ReferenceTypeId;
 import gnu.classpath.jdwp.util.MethodResult;
@@ -64,14 +61,9 @@ import java.nio.ByteBuffer;
  * 
  * @author Aaron Luchko <address@hidden>
  */
-public class ClassTypeCommandSet implements CommandSet
+public class ClassTypeCommandSet
+  extends CommandSet
 {
-  // Our hook into the jvm
-  private final IVirtualMachine vm = Jdwp.getIVirtualMachine();
-
-  // Manages all the different ids that are assigned by jdwp
-  private final IdManager idMan = Jdwp.getIdManager();
-
   public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
       throws JdwpException
   {
@@ -128,7 +120,7 @@ public class ClassTypeCommandSet impleme
 
     for (int i = 0; i < numValues; i++)
       {
-        ObjectId fieldId = idMan.readId(bb);
+        ObjectId fieldId = idMan.readObjectId(bb);
         Field field = (Field) (fieldId.getObject());
         Object value = Value.getUntaggedObj(bb, field.getType());
         try
@@ -154,7 +146,7 @@ public class ClassTypeCommandSet impleme
 
     Object value = mr.getReturnedValue();
     Exception exception = mr.getThrownException();
-    ObjectId eId = idMan.getId(exception);
+    ObjectId eId = idMan.getObjectId(exception);
 
     Value.writeTaggedValue(os, value);
     eId.writeTagged(os);
@@ -166,9 +158,9 @@ public class ClassTypeCommandSet impleme
     MethodResult mr = invokeMethod(bb);
 
     Object obj = mr.getReturnedValue();
-    ObjectId oId = idMan.getId(obj);
+    ObjectId oId = idMan.getObjectId(obj);
     Exception exception = mr.getThrownException();
-    ObjectId eId = idMan.getId(exception);
+    ObjectId eId = idMan.getObjectId(exception);
 
     oId.writeTagged(os);
     eId.writeTagged(os);
@@ -183,10 +175,10 @@ public class ClassTypeCommandSet impleme
     ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
     Class clazz = refId.getType();
 
-    ObjectId tId = idMan.readId(bb);
+    ObjectId tId = idMan.readObjectId(bb);
     Thread thread = (Thread) tId.getObject();
 
-    ObjectId mId = idMan.readId(bb);
+    ObjectId mId = idMan.readObjectId(bb);
     Method method = (Method) mId.getObject();
 
     int args = bb.getInt();
Index: gnu/classpath/jdwp/processor/CommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/CommandSet.java,v
retrieving revision 1.2
diff -u -p -r1.2 CommandSet.java
--- gnu/classpath/jdwp/processor/CommandSet.java        24 Aug 2005 22:57:07 
-0000      1.2
+++ gnu/classpath/jdwp/processor/CommandSet.java        25 Aug 2005 22:05:37 
-0000
@@ -40,6 +40,8 @@ exception statement from your version. *
 package gnu.classpath.jdwp.processor;
 
 import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.VMIdManager;
+import gnu.classpath.jdwp.VMVirtualMachine;
 
 import java.io.DataOutputStream;
 import java.nio.ByteBuffer;
@@ -50,9 +52,19 @@ import java.nio.ByteBuffer;
  *
  * @author Aaron Luchko <address@hidden>
  */
-public interface CommandSet
+public abstract class CommandSet
 {
   /**
+   * The VM's ID manager
+   */
+  protected final VMIdManager idMan = VMIdManager.getDefault ();
+
+  /**
+   * The virtual machine description
+   */
+  protected final VMVirtualMachine vm = VMVirtualMachine.getDefault ();
+
+  /**
    * Runs the given command with the data in distr and writes the data for the
    * reply packet to ostr.
    * 
@@ -62,7 +74,7 @@ public interface CommandSet
    * @return true if the JDWP layer should shut down in response to this packet
    * @throws JdwpException command wasn't carried out successfully
    */
-  public boolean runCommand(ByteBuffer bb, DataOutputStream os,
-                            byte command) 
+  public abstract boolean runCommand(ByteBuffer bb, DataOutputStream os,
+                                    byte command) 
     throws JdwpException;
 }
Index: gnu/classpath/jdwp/processor/EventRequestCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/EventRequestCommandSet.java,v
retrieving revision 1.1
diff -u -p -r1.1 EventRequestCommandSet.java
--- gnu/classpath/jdwp/processor/EventRequestCommandSet.java    12 Aug 2005 
21:12:19 -0000      1.1
+++ gnu/classpath/jdwp/processor/EventRequestCommandSet.java    25 Aug 2005 
22:05:37 -0000
@@ -39,7 +39,6 @@ exception statement from your version. *
 
 package gnu.classpath.jdwp.processor;
 
-import gnu.classpath.jdwp.Jdwp;
 import gnu.classpath.jdwp.JdwpConstants;
 import gnu.classpath.jdwp.event.EventManager;
 import gnu.classpath.jdwp.event.EventRequest;
@@ -58,7 +57,6 @@ import gnu.classpath.jdwp.event.filters.
 import gnu.classpath.jdwp.exception.JdwpException;
 import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
 import gnu.classpath.jdwp.exception.NotImplementedException;
-import gnu.classpath.jdwp.id.IdManager;
 import gnu.classpath.jdwp.id.ObjectId;
 import gnu.classpath.jdwp.id.ReferenceTypeId;
 import gnu.classpath.jdwp.id.ThreadId;
@@ -75,14 +73,9 @@ import java.util.Iterator;
  * 
  * @author Aaron Luchko <address@hidden>
  */
-public class EventRequestCommandSet implements CommandSet
+public class EventRequestCommandSet
+  extends CommandSet
 {
-  // Manages all the different ids that are assigned by jdwp
-  private final IdManager idMan = Jdwp.getIdManager();
-
-  // The Event Manager
-  private final EventManager evMan = Jdwp.getDefault().getEventManager();
-
   public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
       throws JdwpException
   {
@@ -132,10 +125,10 @@ public class EventRequestCommandSet impl
             filter = new CountFilter(bb.getInt());
             break;
           case 2:
-            filter = new ConditionalFilter(idMan.readId(bb));
+            filter = new ConditionalFilter(idMan.readObjectId(bb));
             break;
           case 3:
-            filter = new ThreadFilter((ThreadId) idMan.readId(bb));
+            filter = new ThreadFilter((ThreadId) idMan.readObjectId(bb));
             break;
           case 4:
             filter = new ClassOnlyFilter(idMan.readReferenceTypeId(bb));
@@ -165,13 +158,13 @@ public class EventRequestCommandSet impl
             filter = new FieldOnlyFilter(refId, fieldId);
             break;
           case 10:
-            ObjectId tid = idMan.readId(bb);
+            ObjectId tid = idMan.readObjectId(bb);
             int size = bb.getInt();
             int depth = bb.getInt();
             filter = new StepFilter(tid, size, depth);
             break;
           case 11:
-            ObjectId oid = idMan.readId(bb);
+            ObjectId oid = idMan.readObjectId(bb);
             filter = new InstanceOnlyFilter(oid.getObject());
             break;
           default:
@@ -180,7 +173,8 @@ public class EventRequestCommandSet impl
           }
         eventReq.addFilter(filter);
       }
-    evMan.requestEvent(eventReq);
+
+    EventManager.getDefault().requestEvent(eventReq);
     os.writeInt(eventReq.getId());
 
   }
@@ -190,19 +184,14 @@ public class EventRequestCommandSet impl
   {
     byte eventKind = bb.get();
     int requestId = bb.getInt();
-    EventRequest request = evMan.getRequest(eventKind, requestId);
-    evMan.deleteRequest(request);
+    EventManager.getDefault().deleteRequest(eventKind, requestId);
   }
 
   private void executeClearAllBreakpoints(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    Iterator evReqIter = evMan.getAllRequests(EventRequest.EVENT_BREAKPOINT);
-    while (evReqIter.hasNext())
-      {
-        EventRequest evReq = (EventRequest) evReqIter.next();
-        evMan.deleteRequest(evReq);
-      }
+    byte eventKind = bb.get ();
+    EventManager.getDefault().clearRequests (eventKind);
   }
 
 }
Index: gnu/classpath/jdwp/processor/FieldCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/FieldCommandSet.java,v
retrieving revision 1.1
diff -u -p -r1.1 FieldCommandSet.java
--- gnu/classpath/jdwp/processor/FieldCommandSet.java   12 Jul 2005 23:40:31 
-0000      1.1
+++ gnu/classpath/jdwp/processor/FieldCommandSet.java   25 Aug 2005 22:05:37 
-0000
@@ -49,7 +49,8 @@ import java.nio.ByteBuffer;
  * 
  * @author Aaron Luchko <address@hidden>
  */
-public class FieldCommandSet implements CommandSet
+public class FieldCommandSet
+  extends CommandSet
 {
   /**
    * There are no commands for this CommandSet at this time so we just throw a
Index: gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java,v
retrieving revision 1.1
diff -u -p -r1.1 InterfaceTypeCommandSet.java
--- gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java   12 Jul 2005 
23:40:31 -0000      1.1
+++ gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java   25 Aug 2005 
22:05:37 -0000
@@ -50,7 +50,8 @@ import java.nio.ByteBuffer;
  * 
  * @author Aaron Luchko <address@hidden>
  */
-public class InterfaceTypeCommandSet implements CommandSet
+public class InterfaceTypeCommandSet
+  extends CommandSet
 {
   /**
    * There are no commands for this CommandSet at this time so we just throw a
Index: gnu/classpath/jdwp/processor/MethodCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/MethodCommandSet.java,v
retrieving revision 1.1
diff -u -p -r1.1 MethodCommandSet.java
--- gnu/classpath/jdwp/processor/MethodCommandSet.java  4 Aug 2005 22:16:31 
-0000       1.1
+++ gnu/classpath/jdwp/processor/MethodCommandSet.java  25 Aug 2005 22:05:37 
-0000
@@ -38,13 +38,10 @@ exception statement from your version. *
 
 package gnu.classpath.jdwp.processor;
 
-import gnu.classpath.jdwp.IVirtualMachine;
-import gnu.classpath.jdwp.Jdwp;
 import gnu.classpath.jdwp.JdwpConstants;
 import gnu.classpath.jdwp.exception.JdwpException;
 import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
 import gnu.classpath.jdwp.exception.NotImplementedException;
-import gnu.classpath.jdwp.id.IdManager;
 import gnu.classpath.jdwp.id.ObjectId;
 import gnu.classpath.jdwp.id.ReferenceTypeId;
 import gnu.classpath.jdwp.util.LineTable;
@@ -60,14 +57,9 @@ import java.nio.ByteBuffer;
  * 
  * @author Aaron Luchko <address@hidden>
  */
-public class MethodCommandSet implements CommandSet
+public class MethodCommandSet
+  extends CommandSet
 {
-  // Our hook into the jvm
-  private final IVirtualMachine vm = Jdwp.getIVirtualMachine();
-
-  // Manages all the different ids that are assigned by jdwp
-  private final IdManager idMan = Jdwp.getIdManager();
-
   public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
       throws JdwpException
   {
@@ -110,7 +102,7 @@ public class MethodCommandSet implements
     ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
     Class clazz = refId.getType();
 
-    ObjectId oid = idMan.readId(bb);
+    ObjectId oid = idMan.readObjectId(bb);
     Method method = (Method) oid.getObject();
 
     LineTable lt = vm.getLineTable(clazz, method);
@@ -123,7 +115,7 @@ public class MethodCommandSet implements
     ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
     Class clazz = refId.getType();
 
-    ObjectId oid = idMan.readId(bb);
+    ObjectId oid = idMan.readObjectId(bb);
     Method method = (Method) oid.getObject();
 
     VariableTable vt = vm.getVarTable(clazz, method);
Index: gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java,v
retrieving revision 1.3
diff -u -p -r1.3 ObjectReferenceCommandSet.java
--- gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java 13 Aug 2005 
01:00:39 -0000      1.3
+++ gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java 25 Aug 2005 
22:05:37 -0000
@@ -39,14 +39,11 @@ exception statement from your version. *
 
 package gnu.classpath.jdwp.processor;
 
-import gnu.classpath.jdwp.IVirtualMachine;
-import gnu.classpath.jdwp.Jdwp;
 import gnu.classpath.jdwp.JdwpConstants;
 import gnu.classpath.jdwp.exception.InvalidFieldException;
 import gnu.classpath.jdwp.exception.JdwpException;
 import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
 import gnu.classpath.jdwp.exception.NotImplementedException;
-import gnu.classpath.jdwp.id.IdManager;
 import gnu.classpath.jdwp.id.ObjectId;
 import gnu.classpath.jdwp.id.ReferenceTypeId;
 import gnu.classpath.jdwp.util.Value;
@@ -63,14 +60,9 @@ import java.nio.ByteBuffer;
  * 
  * @author Aaron Luchko <address@hidden>
  */
-public class ObjectReferenceCommandSet implements CommandSet
+public class ObjectReferenceCommandSet
+  extends CommandSet
 {
-  // Our hook into the jvm
-  private final IVirtualMachine vm = Jdwp.getIVirtualMachine();
-
-  // Manages all the different ids that are assigned by jdwp
-  private final IdManager idMan = Jdwp.getIdManager();
-
   public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
     throws JdwpException
   {
@@ -119,7 +111,7 @@ public class ObjectReferenceCommandSet i
   private void executeReferenceType(ByteBuffer bb, DataOutputStream os)
     throws JdwpException, IOException
   {
-    ObjectId oid = idMan.readId(bb);
+    ObjectId oid = idMan.readObjectId(bb);
     Object obj = oid.getObject();
     Class clazz = obj.getClass();
     ReferenceTypeId refId = idMan.getReferenceTypeId(clazz);
@@ -129,7 +121,7 @@ public class ObjectReferenceCommandSet i
   private void executeGetValues(ByteBuffer bb, DataOutputStream os)
     throws JdwpException, IOException
   {
-    ObjectId oid = idMan.readId(bb);
+    ObjectId oid = idMan.readObjectId(bb);
     Object obj = oid.getObject();
 
     int numFields = bb.getInt();
@@ -138,7 +130,7 @@ public class ObjectReferenceCommandSet i
 
     for (int i = 0; i < numFields; i++)
       {
-        Field field = (Field) idMan.readId(bb).getObject();
+        Field field = (Field) idMan.readObjectId(bb).getObject();
         try
           {
             field.setAccessible(true); // Might be a private field
@@ -161,14 +153,14 @@ public class ObjectReferenceCommandSet i
   private void executeSetValues(ByteBuffer bb, DataOutputStream os)
     throws JdwpException, IOException
   {
-    ObjectId oid = idMan.readId(bb);
+    ObjectId oid = idMan.readObjectId(bb);
     Object obj = oid.getObject();
 
     int numFields = bb.getInt();
 
     for (int i = 0; i < numFields; i++)
       {
-        Field field = (Field) idMan.readId(bb).getObject();
+        Field field = (Field) idMan.readObjectId(bb).getObject();
         Object value = Value.getUntaggedObj(bb, field.getType());
         try
           {
@@ -201,16 +193,16 @@ public class ObjectReferenceCommandSet i
   private void executeInvokeMethod(ByteBuffer bb, DataOutputStream os)
     throws JdwpException, IOException
   {
-    ObjectId oid = idMan.readId(bb);
+    ObjectId oid = idMan.readObjectId(bb);
     Object obj = oid.getObject();
 
-    ObjectId tid = idMan.readId(bb);
+    ObjectId tid = idMan.readObjectId(bb);
     Thread thread = (Thread) tid.getObject();
 
     ReferenceTypeId rid = idMan.readReferenceTypeId(bb);
     Class clazz = rid.getType();
 
-    ObjectId mid = idMan.readId(bb);
+    ObjectId mid = idMan.readObjectId(bb);
     Method method = (Method) mid.getObject();
 
     int args = bb.getInt();
@@ -237,7 +229,7 @@ public class ObjectReferenceCommandSet i
     Object value = mr.getReturnedValue();
     Exception exception = mr.getThrownException();
 
-    ObjectId eId = idMan.getId(exception);
+    ObjectId eId = idMan.getObjectId(exception);
     Value.writeTaggedValue(os, value);
     eId.writeTagged(os);
   }
@@ -245,22 +237,22 @@ public class ObjectReferenceCommandSet i
   private void executeDisableCollection(ByteBuffer bb, DataOutputStream os)
     throws JdwpException, IOException
   {
-    ObjectId oid = idMan.readId(bb);
+    ObjectId oid = idMan.readObjectId(bb);
     oid.disableCollection();
   }
 
   private void executeEnableCollection(ByteBuffer bb, DataOutputStream os)
     throws JdwpException, IOException
   {
-    ObjectId oid = idMan.readId(bb);
+    ObjectId oid = idMan.readObjectId(bb);
     oid.enableCollection();
   }
 
   private void executeIsCollected(ByteBuffer bb, DataOutputStream os)
     throws JdwpException, IOException
   {
-    ObjectId oid = idMan.readId(bb);
-    boolean collected = oid.isCollected();
+    ObjectId oid = idMan.readObjectId(bb);
+    boolean collected = (oid.getReference().get () == null);
     os.writeBoolean(collected);
   }
 }
Index: gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java,v
retrieving revision 1.2
diff -u -p -r1.2 ReferenceTypeCommandSet.java
--- gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java   27 Jul 2005 
16:01:43 -0000      1.2
+++ gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java   25 Aug 2005 
22:05:37 -0000
@@ -39,14 +39,11 @@ exception statement from your version. *
 
 package gnu.classpath.jdwp.processor;
 
-import gnu.classpath.jdwp.IVirtualMachine;
-import gnu.classpath.jdwp.Jdwp;
 import gnu.classpath.jdwp.JdwpConstants;
 import gnu.classpath.jdwp.exception.InvalidFieldException;
 import gnu.classpath.jdwp.exception.JdwpException;
 import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
 import gnu.classpath.jdwp.exception.NotImplementedException;
-import gnu.classpath.jdwp.id.IdManager;
 import gnu.classpath.jdwp.id.ObjectId;
 import gnu.classpath.jdwp.id.ReferenceTypeId;
 import gnu.classpath.jdwp.util.JdwpString;
@@ -64,14 +61,9 @@ import java.nio.ByteBuffer;
  * 
  * @author Aaron Luchko <address@hidden>
  */
-public class ReferenceTypeCommandSet implements CommandSet
+public class ReferenceTypeCommandSet
+  extends CommandSet
 {
-  // Our hook into the jvm
-  private final IVirtualMachine vm = Jdwp.getIVirtualMachine();
-
-  // Manages all the different ids that are assigned by jdwp
-  private final IdManager idMan = Jdwp.getIdManager();
-
   public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
     throws JdwpException
   {
@@ -153,7 +145,7 @@ public class ReferenceTypeCommandSet imp
 
     Class clazz = refId.getType();
     ClassLoader loader = clazz.getClassLoader();
-    ObjectId oid = idMan.getId(loader);
+    ObjectId oid = idMan.getObjectId(loader);
     oid.write(os);
   }
 
@@ -177,7 +169,7 @@ public class ReferenceTypeCommandSet imp
     for (int i = 0; i < fields.length; i++)
       {
         Field field = fields[i];
-        idMan.getId(field).write(os);
+        idMan.getObjectId(field).write(os);
         JdwpString.writeString(os, field.getName());
         JdwpString.writeString(os, Signature.computeFieldSignature(field));
         os.writeInt(field.getModifiers());
@@ -195,7 +187,7 @@ public class ReferenceTypeCommandSet imp
     for (int i = 0; i < methods.length; i++)
       {
         Method method = methods[i];
-        idMan.getId(method).write(os);
+        idMan.getObjectId(method).write(os);
         JdwpString.writeString(os, method.getName());
         JdwpString.writeString(os, Signature.computeMethodSignature(method));
         os.writeInt(method.getModifiers());
@@ -212,7 +204,7 @@ public class ReferenceTypeCommandSet imp
     os.writeInt(numFields); // Looks pointless but this is the protocol
     for (int i = 0; i < numFields; i++)
       {
-        ObjectId fieldId = idMan.readId(bb);
+        ObjectId fieldId = idMan.readObjectId(bb);
         Field field = (Field) (fieldId.getObject());
         Class fieldClazz = field.getDeclaringClass();
 
@@ -300,7 +292,7 @@ public class ReferenceTypeCommandSet imp
   {
     ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
     Class clazz = refId.getType();
-    ObjectId clazzObjectId = idMan.getId(clazz);
+    ObjectId clazzObjectId = idMan.getObjectId(clazz);
     clazzObjectId.write(os);
   }
 
Index: gnu/classpath/jdwp/processor/StackFrameCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/StackFrameCommandSet.java,v
retrieving revision 1.3
diff -u -p -r1.3 StackFrameCommandSet.java
--- gnu/classpath/jdwp/processor/StackFrameCommandSet.java      24 Aug 2005 
22:57:07 -0000      1.3
+++ gnu/classpath/jdwp/processor/StackFrameCommandSet.java      25 Aug 2005 
22:05:37 -0000
@@ -40,13 +40,10 @@ exception statement from your version. *
 package gnu.classpath.jdwp.processor;
 
 import gnu.classpath.jdwp.VMFrame;
-import gnu.classpath.jdwp.IVirtualMachine;
-import gnu.classpath.jdwp.Jdwp;
 import gnu.classpath.jdwp.JdwpConstants;
 import gnu.classpath.jdwp.exception.JdwpException;
 import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
 import gnu.classpath.jdwp.exception.NotImplementedException;
-import gnu.classpath.jdwp.id.IdManager;
 import gnu.classpath.jdwp.id.ObjectId;
 import gnu.classpath.jdwp.util.Value;
 
@@ -59,14 +56,9 @@ import java.nio.ByteBuffer;
  * 
  * @author Aaron Luchko <address@hidden>
  */
-public class StackFrameCommandSet implements CommandSet
+public class StackFrameCommandSet
+  extends CommandSet
 {
-  // Our hook into the jvm
-  private final IVirtualMachine vm = Jdwp.getIVirtualMachine();
-
-  // Manages all the different ids that are assigned by jdwp
-  private final IdManager idMan = Jdwp.getIdManager();
-
   public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
       throws JdwpException
   {
@@ -104,7 +96,7 @@ public class StackFrameCommandSet implem
   private void executeGetValues(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ObjectId tId = idMan.readId(bb);
+    ObjectId tId = idMan.readObjectId(bb);
     Thread thread = (Thread) tId.getObject();
 
     // Although Frames look like other ids they are not. First they are not
@@ -128,7 +120,7 @@ public class StackFrameCommandSet implem
   private void executeSetValues(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ObjectId tId = idMan.readId(bb);
+    ObjectId tId = idMan.readObjectId(bb);
     Thread thread = (Thread) tId.getObject();
 
     VMFrame frame = vm.getVMFrame(thread, bb);
@@ -145,7 +137,7 @@ public class StackFrameCommandSet implem
   private void executeThisObject(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ObjectId tId = idMan.readId(bb);
+    ObjectId tId = idMan.readObjectId(bb);
     Thread thread = (Thread) tId.getObject();
 
     VMFrame frame = vm.getVMFrame(thread, bb);
Index: gnu/classpath/jdwp/processor/StringReferenceCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/StringReferenceCommandSet.java,v
retrieving revision 1.2
diff -u -p -r1.2 StringReferenceCommandSet.java
--- gnu/classpath/jdwp/processor/StringReferenceCommandSet.java 24 Aug 2005 
22:57:07 -0000      1.2
+++ gnu/classpath/jdwp/processor/StringReferenceCommandSet.java 25 Aug 2005 
22:05:37 -0000
@@ -40,7 +40,6 @@ exception statement from your version. *
 
 package gnu.classpath.jdwp.processor;
 
-import gnu.classpath.jdwp.Jdwp;
 import gnu.classpath.jdwp.JdwpConstants;
 import gnu.classpath.jdwp.exception.JdwpException;
 import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
@@ -57,7 +56,8 @@ import java.nio.ByteBuffer;
  * 
  * @author Aaron Luchko <address@hidden>
  */
-public class StringReferenceCommandSet implements CommandSet
+public class StringReferenceCommandSet
+  extends CommandSet
 {
 
   public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
@@ -90,7 +90,7 @@ public class StringReferenceCommandSet i
   private void executeValue(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ObjectId oid = Jdwp.getIdManager().readId(bb);
+    ObjectId oid = idMan.readObjectId(bb);
 
     String str = (String) oid.getObject();
     JdwpString.writeString(os, str);
Index: gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java,v
retrieving revision 1.1
diff -u -p -r1.1 ThreadGroupReferenceCommandSet.java
--- gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java    26 Jul 
2005 23:30:36 -0000      1.1
+++ gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java    25 Aug 
2005 22:05:37 -0000
@@ -39,12 +39,10 @@ exception statement from your version. *
 
 package gnu.classpath.jdwp.processor;
 
-import gnu.classpath.jdwp.Jdwp;
 import gnu.classpath.jdwp.JdwpConstants;
 import gnu.classpath.jdwp.exception.JdwpException;
 import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
 import gnu.classpath.jdwp.exception.NotImplementedException;
-import gnu.classpath.jdwp.id.IdManager;
 import gnu.classpath.jdwp.id.ObjectId;
 import gnu.classpath.jdwp.util.JdwpString;
 
@@ -57,11 +55,9 @@ import java.nio.ByteBuffer;
  * 
  * @author Aaron Luchko <address@hidden>
  */
-public class ThreadGroupReferenceCommandSet implements CommandSet
+public class ThreadGroupReferenceCommandSet
+  extends CommandSet
 {
-  // Manages all the different ids that are assigned by jdwp
-  private final IdManager idMan = Jdwp.getIdManager();
-
   public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
     throws JdwpException
   {
@@ -95,7 +91,7 @@ public class ThreadGroupReferenceCommand
   private void executeName(ByteBuffer bb, DataOutputStream os)
     throws JdwpException, IOException
   {
-    ObjectId oid = idMan.readId(bb);
+    ObjectId oid = idMan.readObjectId(bb);
     ThreadGroup group = (ThreadGroup) oid.getObject();
     JdwpString.writeString(os, group.getName());
   }
@@ -103,17 +99,17 @@ public class ThreadGroupReferenceCommand
   private void executeParent(ByteBuffer bb, DataOutputStream os)
     throws JdwpException, IOException
   {
-    ObjectId oid = idMan.readId(bb);
+    ObjectId oid = idMan.readObjectId(bb);
     ThreadGroup group = (ThreadGroup) oid.getObject();
     ThreadGroup parent = group.getParent();
-    ObjectId parentId = idMan.getId(parent);
+    ObjectId parentId = idMan.getObjectId(parent);
     parentId.write(os);
   }
 
   private void executeChildren(ByteBuffer bb, DataOutputStream os)
     throws JdwpException, IOException
   {
-    ObjectId oid = idMan.readId(bb);
+    ObjectId oid = idMan.readObjectId(bb);
     ThreadGroup group = (ThreadGroup) oid.getObject();
 
     ThreadGroup jdwpGroup = Thread.currentThread().getThreadGroup();
@@ -143,7 +139,7 @@ public class ThreadGroupReferenceCommand
         if (thread == null)
           break; // No threads after this point
         if (!thread.getThreadGroup().equals(jdwpGroup))
-          idMan.getId(thread).write(os);
+          idMan.getObjectId(thread).write(os);
       }
 
     int numGroups = group.activeCount();
@@ -172,7 +168,7 @@ public class ThreadGroupReferenceCommand
         if (tgroup == null)
           break; // No ThreadGroups after this point
         if (!tgroup.equals(jdwpGroup))
-          idMan.getId(tgroup).write(os);
+          idMan.getObjectId(tgroup).write(os);
       }
   }
 }
Index: gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java,v
retrieving revision 1.3
diff -u -p -r1.3 ThreadReferenceCommandSet.java
--- gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java 24 Aug 2005 
22:57:07 -0000      1.3
+++ gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java 25 Aug 2005 
22:05:37 -0000
@@ -40,14 +40,11 @@ exception statement from your version. *
 package gnu.classpath.jdwp.processor;
 
 import gnu.classpath.jdwp.VMFrame;
-import gnu.classpath.jdwp.IVirtualMachine;
-import gnu.classpath.jdwp.Jdwp;
 import gnu.classpath.jdwp.JdwpConstants;
 import gnu.classpath.jdwp.exception.InvalidObjectException;
 import gnu.classpath.jdwp.exception.JdwpException;
 import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
 import gnu.classpath.jdwp.exception.NotImplementedException;
-import gnu.classpath.jdwp.id.IdManager;
 import gnu.classpath.jdwp.id.ObjectId;
 import gnu.classpath.jdwp.id.ThreadId;
 import gnu.classpath.jdwp.util.JdwpString;
@@ -63,14 +60,9 @@ import java.util.ArrayList;
  * 
  * @author Aaron Luchko <address@hidden>
  */
-public class ThreadReferenceCommandSet implements CommandSet
+public class ThreadReferenceCommandSet
+  extends CommandSet
 {
-  // Our hook into the jvm
-  private final IVirtualMachine vm = Jdwp.getIVirtualMachine();
-
-  // Manages all the different ids that are assigned by jdwp
-  private final IdManager idMan = Jdwp.getIdManager();
-
   public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
       throws JdwpException
   {
@@ -131,7 +123,7 @@ public class ThreadReferenceCommandSet i
   private void executeName(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ThreadId tid = (ThreadId) idMan.readId(bb);
+    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
     Thread thread = (Thread) tid.getObject();
     JdwpString.writeString(os, thread.getName());
   }
@@ -139,7 +131,7 @@ public class ThreadReferenceCommandSet i
   private void executeSuspend(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ThreadId tid = (ThreadId) idMan.readId(bb);
+    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
     Thread thread = (Thread) tid.getObject();
     vm.suspendThread(thread);
   }
@@ -147,7 +139,7 @@ public class ThreadReferenceCommandSet i
   private void executeResume(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ThreadId tid = (ThreadId) idMan.readId(bb);
+    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
     Thread thread = (Thread) tid.getObject();
     vm.suspendThread(thread);
   }
@@ -155,11 +147,11 @@ public class ThreadReferenceCommandSet i
   private void executeStatus(ByteBuffer bb, DataOutputStream os)
       throws InvalidObjectException, IOException
   {
-    ThreadId tid = (ThreadId) idMan.readId(bb);
+    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
     Thread thread = (Thread) tid.getObject();
     int threadStatus = vm.getThreadStatus(thread);
     // There's only one possible SuspendStatus...
-    int suspendStatus = JdwpConstants.SuspendStatus.SUSPEND_STATUS_SUSPENDED;
+    int suspendStatus = JdwpConstants.SuspendStatus.SUSPENDED;
 
     os.writeInt(threadStatus);
     os.writeInt(suspendStatus);
@@ -168,17 +160,17 @@ public class ThreadReferenceCommandSet i
   private void executeThreadGroup(ByteBuffer bb, DataOutputStream os)
       throws InvalidObjectException, IOException
   {
-    ThreadId tid = (ThreadId) idMan.readId(bb);
+    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
     Thread thread = (Thread) tid.getObject();
     ThreadGroup group = thread.getThreadGroup();
-    ObjectId groupId = idMan.getId(group);
+    ObjectId groupId = idMan.getObjectId(group);
     groupId.write(os);
   }
 
   private void executeFrames(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ThreadId tid = (ThreadId) idMan.readId(bb);
+    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
     Thread thread = (Thread) tid.getObject();
     int startFrame = bb.getInt();
     int length = bb.getInt();
@@ -197,7 +189,7 @@ public class ThreadReferenceCommandSet i
   private void executeFrameCount(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ThreadId tid = (ThreadId) idMan.readId(bb);
+    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
     Thread thread = (Thread) tid.getObject();
 
     int frameCount = vm.getFrameCount(thread);
@@ -226,16 +218,16 @@ public class ThreadReferenceCommandSet i
   private void executeStop(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ThreadId tid = (ThreadId) idMan.readId(bb);
+    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
     Thread thread = (Thread) tid.getObject();
-    ObjectId exception = idMan.readId(bb);
+    ObjectId exception = idMan.readObjectId(bb);
     vm.stopThread(thread, (Exception) exception.getObject());
   }
 
   private void executeInterrupt(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ThreadId tid = (ThreadId) idMan.readId(bb);
+    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
     Thread thread = (Thread) tid.getObject();
     thread.interrupt();
   }
@@ -243,7 +235,7 @@ public class ThreadReferenceCommandSet i
   private void executeSuspendCount(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ThreadId tid = (ThreadId) idMan.readId(bb);
+    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
     Thread thread = (Thread) tid.getObject();
     int suspendCount = vm.getSuspendCount(thread);
     os.writeInt(suspendCount);
Index: gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java,v
retrieving revision 1.2
diff -u -p -r1.2 VirtualMachineCommandSet.java
--- gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java  13 Aug 2005 
01:07:10 -0000      1.2
+++ gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java  25 Aug 2005 
22:05:37 -0000
@@ -39,13 +39,11 @@ exception statement from your version. *
 
 package gnu.classpath.jdwp.processor;
 
-import gnu.classpath.jdwp.IVirtualMachine;
 import gnu.classpath.jdwp.Jdwp;
 import gnu.classpath.jdwp.JdwpConstants;
 import gnu.classpath.jdwp.exception.JdwpException;
 import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
 import gnu.classpath.jdwp.exception.NotImplementedException;
-import gnu.classpath.jdwp.id.IdManager;
 import gnu.classpath.jdwp.id.ObjectId;
 import gnu.classpath.jdwp.id.ReferenceTypeId;
 import gnu.classpath.jdwp.util.JdwpString;
@@ -63,14 +61,9 @@ import java.util.Properties;
  * 
  * @author Aaron Luchko <address@hidden>
  */
-public class VirtualMachineCommandSet implements CommandSet
+public class VirtualMachineCommandSet
+  extends CommandSet
 {
-  // Our hook into the jvm
-  private final IVirtualMachine vm = Jdwp.getIVirtualMachine();
-
-  // Manages all the different ids that are assigned by jdwp
-  private final IdManager idMan = Jdwp.getIdManager();
-
   // The Jdwp object
   private final Jdwp jdwp = Jdwp.getDefault();
 
@@ -270,7 +263,7 @@ public class VirtualMachineCommandSet im
         if (thread == null)
           break; // No threads after this point
         if (!thread.getThreadGroup().equals(jdwpGroup))
-          idMan.getId(thread).write(os);
+          idMan.getObjectId(thread).write(os);
       }
   }
 
@@ -281,7 +274,7 @@ public class VirtualMachineCommandSet im
     ThreadGroup root = getRootThreadGroup(jdwpGroup);
 
     os.writeInt(1); // Just one top level group allowed?
-    idMan.getId(root);
+    idMan.getObjectId(root);
   }
 
   private void executeDispose(ByteBuffer bb, DataOutputStream os)
@@ -338,7 +331,7 @@ public class VirtualMachineCommandSet im
     throws JdwpException, IOException
   {
     String string = JdwpString.readString(bb);
-    ObjectId stringId = Jdwp.getIdManager().getId(string);
+    ObjectId stringId = idMan.getObjectId(string);
     
     // Since this string isn't referenced anywhere we'll disable garbage
     // collection on it so it's still around when the debugger gets back to it.
@@ -386,7 +379,7 @@ public class VirtualMachineCommandSet im
   {
     // Instead of going through the list of objects they give us it's probably
     // better just to find the garbage collected objects ourselves
-    idMan.update();
+    //idMan.update();
   }
 
   private void executeHoldEvents(ByteBuffer bb, DataOutputStream os)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]