Classpath JDWP merge with upstream
authorKeith Seitz <keiths@redhat.com>
Tue, 27 Mar 2007 18:40:48 +0000 (18:40 +0000)
committerKeith Seitz <kseitz@gcc.gnu.org>
Tue, 27 Mar 2007 18:40:48 +0000 (18:40 +0000)
From-SVN: r123265

66 files changed:
libjava/classpath/ChangeLog
libjava/classpath/gnu/classpath/jdwp/event/EventManager.java
libjava/classpath/gnu/classpath/jdwp/event/filters/StepFilter.java
libjava/classpath/gnu/classpath/jdwp/exception/InvalidSlotException.java [new file with mode: 0644]
libjava/classpath/gnu/classpath/jdwp/exception/InvalidTagException.java [new file with mode: 0644]
libjava/classpath/gnu/classpath/jdwp/exception/TypeMismatchException.java [new file with mode: 0644]
libjava/classpath/gnu/classpath/jdwp/id/NullObjectId.java [new file with mode: 0644]
libjava/classpath/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java
libjava/classpath/gnu/classpath/jdwp/processor/ClassTypeCommandSet.java
libjava/classpath/gnu/classpath/jdwp/processor/EventRequestCommandSet.java
libjava/classpath/gnu/classpath/jdwp/processor/MethodCommandSet.java
libjava/classpath/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java
libjava/classpath/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
libjava/classpath/gnu/classpath/jdwp/processor/StackFrameCommandSet.java
libjava/classpath/gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java
libjava/classpath/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
libjava/classpath/gnu/classpath/jdwp/util/MethodResult.java
libjava/classpath/gnu/classpath/jdwp/util/MonitorInfo.java [new file with mode: 0644]
libjava/classpath/gnu/classpath/jdwp/util/NullObject.java [new file with mode: 0644]
libjava/classpath/gnu/classpath/jdwp/util/Value.java
libjava/classpath/gnu/classpath/jdwp/value/BooleanValue.java [new file with mode: 0644]
libjava/classpath/gnu/classpath/jdwp/value/ByteValue.java [new file with mode: 0644]
libjava/classpath/gnu/classpath/jdwp/value/CharValue.java [new file with mode: 0644]
libjava/classpath/gnu/classpath/jdwp/value/DoubleValue.java [new file with mode: 0644]
libjava/classpath/gnu/classpath/jdwp/value/FloatValue.java [new file with mode: 0644]
libjava/classpath/gnu/classpath/jdwp/value/IntValue.java [new file with mode: 0644]
libjava/classpath/gnu/classpath/jdwp/value/LongValue.java [new file with mode: 0644]
libjava/classpath/gnu/classpath/jdwp/value/ObjectValue.java [new file with mode: 0644]
libjava/classpath/gnu/classpath/jdwp/value/ShortValue.java [new file with mode: 0644]
libjava/classpath/gnu/classpath/jdwp/value/StringValue.java [new file with mode: 0644]
libjava/classpath/gnu/classpath/jdwp/value/Value.java [new file with mode: 0644]
libjava/classpath/gnu/classpath/jdwp/value/ValueFactory.java [new file with mode: 0644]
libjava/classpath/gnu/classpath/jdwp/value/VoidValue.java [new file with mode: 0644]
libjava/classpath/lib/gnu/classpath/jdwp/VMFrame.class
libjava/classpath/lib/gnu/classpath/jdwp/VMVirtualMachine.class
libjava/classpath/lib/gnu/classpath/jdwp/event/EventManager.class
libjava/classpath/lib/gnu/classpath/jdwp/event/filters/StepFilter.class
libjava/classpath/lib/gnu/classpath/jdwp/exception/InvalidSlotException.class [new file with mode: 0644]
libjava/classpath/lib/gnu/classpath/jdwp/exception/InvalidTagException.class [new file with mode: 0644]
libjava/classpath/lib/gnu/classpath/jdwp/exception/TypeMismatchException.class [new file with mode: 0644]
libjava/classpath/lib/gnu/classpath/jdwp/id/NullObjectId.class [new file with mode: 0644]
libjava/classpath/lib/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.class
libjava/classpath/lib/gnu/classpath/jdwp/processor/ClassTypeCommandSet.class
libjava/classpath/lib/gnu/classpath/jdwp/processor/EventRequestCommandSet.class
libjava/classpath/lib/gnu/classpath/jdwp/processor/MethodCommandSet.class
libjava/classpath/lib/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.class
libjava/classpath/lib/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.class
libjava/classpath/lib/gnu/classpath/jdwp/processor/StackFrameCommandSet.class
libjava/classpath/lib/gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.class
libjava/classpath/lib/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.class
libjava/classpath/lib/gnu/classpath/jdwp/util/MethodResult.class
libjava/classpath/lib/gnu/classpath/jdwp/util/MonitorInfo.class [new file with mode: 0644]
libjava/classpath/lib/gnu/classpath/jdwp/util/NullObject.class [new file with mode: 0644]
libjava/classpath/lib/gnu/classpath/jdwp/value/BooleanValue.class [new file with mode: 0644]
libjava/classpath/lib/gnu/classpath/jdwp/value/ByteValue.class [new file with mode: 0644]
libjava/classpath/lib/gnu/classpath/jdwp/value/CharValue.class [new file with mode: 0644]
libjava/classpath/lib/gnu/classpath/jdwp/value/DoubleValue.class [new file with mode: 0644]
libjava/classpath/lib/gnu/classpath/jdwp/value/FloatValue.class [new file with mode: 0644]
libjava/classpath/lib/gnu/classpath/jdwp/value/IntValue.class [new file with mode: 0644]
libjava/classpath/lib/gnu/classpath/jdwp/value/LongValue.class [new file with mode: 0644]
libjava/classpath/lib/gnu/classpath/jdwp/value/ObjectValue.class [new file with mode: 0644]
libjava/classpath/lib/gnu/classpath/jdwp/value/ShortValue.class [new file with mode: 0644]
libjava/classpath/lib/gnu/classpath/jdwp/value/StringValue.class [new file with mode: 0644]
libjava/classpath/lib/gnu/classpath/jdwp/value/Value.class [new file with mode: 0644]
libjava/classpath/lib/gnu/classpath/jdwp/value/ValueFactory.class [new file with mode: 0644]
libjava/classpath/lib/gnu/classpath/jdwp/value/VoidValue.class [new file with mode: 0644]

index 2ff19beeb29121a39750adb4f1d5a0fa4d861099..305ac4f2314b5f66ba40d6203b5311d12dd68e53 100644 (file)
@@ -1,3 +1,144 @@
+2007-03-27  Keith Seitz  <keiths@redhat.com>
+
+       Merged from upstream:
+       2007-03-09  Kyle Galloway  <kgallowa@redhat.com>
+       * gnu/classpath/jdwp/exception/InvalidTagException.java: New file.
+       * gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java
+       (executeGetValues): Use Value type.
+       (exectureSetValues): Ditto.  
+       * gnu/classpath/jdwp/processor/ClassTypeCommandSet.java
+       (executeGetValues): Use Value type.
+       (executeSetValues): Ditto.
+       (invokeMethod): Record method return type.
+       * gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java
+       (executeGetValues): Use Value type.
+       (executeSetValues): Ditto.
+       * gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
+       (executeGetValues): Use Value type.
+       * gnu/classpath/jdwp/processor/StackFrameCommandSet.java
+       (executeGetValues): Use Value type.
+       (executeSetValues): Ditto.
+       * gnu/classpath/jdwp/util/MethodResult.java: Add resType to store
+       return type.
+       (getResultType): New Method.
+       (setResultType): Ditto.
+       * gnu/classpath/jdwp/util/Value.java: Remove.
+       * gnu/classpath/jdwp/value: New Package.
+       * gnu/classpath/jdwp/value/Value.java: New file.
+       * gnu/classpath/jdwp/value/BooleanValue.java: New file.
+       * gnu/classpath/jdwp/value/ByteValue.java: New file.
+       * gnu/classpath/jdwp/value/CharValue.java: New file.
+       * gnu/classpath/jdwp/value/DoubleValue.java: New file.
+       * gnu/classpath/jdwp/value/FloatValue.java: New file.
+       * gnu/classpath/jdwp/value/IntValue.java: New file.
+       * gnu/classpath/jdwp/value/LongValue.java: New file.
+       * gnu/classpath/jdwp/value/ObjectValue.java: New file.
+       * gnu/classpath/jdwp/value/ShortValue.java: New file.
+       * gnu/classpath/jdwp/value/StringValue.java: New file.
+       * gnu/classpath/jdwp/value/ValueFactory.java: New file.
+       * gnu/classpath/jdwp/value/VoidValue.java: New file.
+
+       2007-02-28  Keith Seitz  <keiths@redhat.com>
+       * gnu/classpath/jdwp/processor/EventRequestCommandSet.java
+       (executeSet): Check if VM has capability for field access
+       or modification events.
+       * gnu/classpath/jdwp/processor/MethodCommandSet.java
+       (executeByteCodes): Check if VM has capability and
+       implement.
+       * gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java
+       (executeMonitorInfo): Likewise.
+       * gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
+       (executeSourceDebugExtension): Likewise.
+       * gnu/classpath/jdwp/processor/StackFrameCommandSet.java
+       (executePopFrames): Likewise.
+       * gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java
+       (executeOwnedMonitors): Likewise.
+       (executeCurrentContendedMonitor): Likewise.
+       * gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
+       (executeCapabilities): Rewrite using new VMVirtualMachine
+       capabilities.
+       (executeRedefineClasses): Check if VM has capability and
+       implement.
+       (executeSetDefaultStratum): Likewise.
+       * gnu/classpath/jdwp/util/MonitorInfo.java; New file.
+       * vm/reference/gnu/classpath/jdwp/VMVirtualMachine.java
+       (canWatchFieldModification): New class constant.
+       (canWatchFieldAccess): Likewise.
+       (canGetBytecodes): Likewise.
+       (canGetSyntheticAttribute): Likewise.
+       (canGetOwnedMonitorInfo): Likewise.
+       (canGetCurrentContendedMonitor): Likewise.
+       (canGetMonitorInfo): Likewise.
+       (canRedefineClasses): Likewise.
+       (canAddMethod): Likewise.
+       (canUnrestrictedlyRedefineClasses): Likewise.
+       (canPopFrames): Likewise.
+       (canUseInstanceFilters): Likewise.
+       (canGetSourceDebugExtension): Likewise.
+       (canRequestVMDeathEvent): Likewise.
+       (canSetDefaultStratum): Likewise.
+       (redefineClasses): New method.
+       (setDefaultStratum): Likewise.
+       (getSourceDebugExtension): Likewise.
+       (getBytecodes): Likewise.
+       (getMonitorInfo): Likewise.
+       (getOwnedMonitors): Likewise.
+       (getCurrentContendedMonitor): Likewise.
+       (popFrames): Likewise.
+
+       2007-02-28  Keith Seitz  <keiths@redhat.com>
+       * gnu/classpath/jdwp/processor/MethodCommandSet.java
+       (executeLineTable): Use ReferenceTypeId instead of
+       ClassReferenceTypeId.
+       (executeVariableTable): Likewise.
+       (executeVariableTableWithGeneric): Fix error message.
+       * gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
+       (executeSignatureWithGeneric): Fix error message.
+       (executeFieldWithGeneric): Likewise.
+       (executeMethodsWithGeneric): Likewise.
+       * gnu/classpath/jdwp/processor/StackFrameCommandSet.java
+       (executeGetValues): Use ThreadId instead of ObjectId.
+       (executeSetValues): Likewise.
+       (executeThisObject): Likewise.
+
+       2007-02-28  Kyle Galloway  <kgallowa@redhat.com>
+       * gnu/classpath/jdwp/id/NullObjectId.java: New class.
+       * gnu/classpath/jdwp/util/NullObject.java: New class.
+       * vm/reference/gnu/classpath/jdwp/VMIdManager.java
+       (getObjectId): Handle null object.
+       (get): Handle objectId of 0. 
+
+       2007-02-22  Keith Seitz  <keiths@redhat.ecom>
+       * vm/reference/gnu/classpath/jdwp/VMVirtualMachine.java
+       (getAllLoadedClassesCount): Remove.
+       (getAllLoadedClasses): Return a Collection.
+       * gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
+       (executeClassesBySignature): VMVirtualMachine.getAllLoadedClasses
+       now returns Collection.
+       (executeAllClasses): Likewise.
+       Get size of return from Colleciton instead of calling
+       getAllLoadedClassesCount.
+
+       2007-02-22  Kyle Galloway  <kgallowa@redhat.com>
+       * gnu/classpath/jdwp/processor/StackFrameCommandSet.java 
+       (executeGetValues): Pass a signature byte to VMFrame.getValue.
+       * vm/reference/gnu/classpath/jdwp/VMFrame.java (getValue): Add
+       signature parameter.
+
+       2007-02-02  Kyle Galloway  <kgallowa@redhat.com>
+       * gnu/classpath/jdwp/processor/StackFrameCommandSet.java
+       (executeGetValues): Changed getFrame to use a jlong to pass frameID.
+       (executeSetValues): Ditto.
+       (executeThisObject): Ditto.
+       * vm/reference/gnu/classpath/jdwp/VMFrame.java: Added thread field
+       and a constructor used to create VMFrames.
+       (getThread): New method.
+       * vm/reference/gnu/classpath/jdwp/VMVirtualMachine.java(getFrame):
+       Changed to take a long instead of a ByteBuffer to pass the frameID.
+
+       2007-01-15  Kyle Galloway  <kgallowa@redhat.com>
+       * gnu/classpath/jdwp/exception/InvalidSlotException.java: New file.
+
 2007-03-26  Tom Tromey  <tromey@redhat.com>
 
        * doc/cp-tools.texinfo (gcjh Tool): Added more text.
index 54a7b08312d9068dbf9871ab58737f3bbbdbb535..02ffa2413953a44fad8bd011e5bd2308202d0042 100644 (file)
@@ -1,5 +1,5 @@
 /* EventManager.java -- event management and notification infrastructure
-   Copyright (C) 2005, 2006 Free Software Foundation
+   Copyright (C) 2005, 2006, 2007 Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -39,6 +39,7 @@ exception statement from your version. */
 
 package gnu.classpath.jdwp.event;
 
+import gnu.classpath.jdwp.Jdwp;
 import gnu.classpath.jdwp.VMVirtualMachine;
 import gnu.classpath.jdwp.exception.InvalidEventTypeException;
 import gnu.classpath.jdwp.exception.JdwpException;
@@ -130,9 +131,10 @@ public class EventManager
     // only two: VM_INIT, VM_DEATH
     try
       {
+       byte sp = (Jdwp.suspendOnStartup()
+                  ? EventRequest.SUSPEND_THREAD : EventRequest.SUSPEND_NONE);
        requestEvent (new EventRequest (0,
-                                       EventRequest.EVENT_VM_INIT,
-                                       EventRequest.SUSPEND_NONE));
+                                       EventRequest.EVENT_VM_INIT, sp));
        requestEvent (new EventRequest (0,
                                        EventRequest.EVENT_VM_DEATH,
                                        EventRequest.SUSPEND_NONE));
index 340546e887d8b664bd25777cc4cd0993f843ce53..d18f6975ebf675520534df13de2572ee415ab078 100644 (file)
@@ -1,5 +1,5 @@
 /* StepFilter.java -- a step filter
-   Copyright (C) 2005 Free Software Foundation
+   Copyright (C) 2005, 2007 Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -39,6 +39,7 @@ exception statement from your version. */
 
 package gnu.classpath.jdwp.event.filters;
 
+import gnu.classpath.jdwp.JdwpConstants;
 import gnu.classpath.jdwp.event.Event;
 import gnu.classpath.jdwp.exception.InvalidThreadException;
 import gnu.classpath.jdwp.id.ThreadId;
@@ -48,6 +49,12 @@ import gnu.classpath.jdwp.id.ThreadId;
  * satisfy depth and size constraints. This modifier can only be used with
  * step event kinds."
  *
+ * This "filter" is not really a filter. It is simply a way to communicate
+ * stepping information in a convenient way between the JDWP backend and
+ * the virtual machine.
+ * 
+ * Consequently, this "filter" always matches.
+ * 
  * @author Keith Seitz  (keiths@redhat.com)
  */
 public class StepFilter
@@ -115,7 +122,6 @@ public class StepFilter
    */
   public boolean matches (Event event)
   {
-    // FIXME
-    throw new RuntimeException ("StepFilter.matches not implemented");
+    return true;
   }
 }
diff --git a/libjava/classpath/gnu/classpath/jdwp/exception/InvalidSlotException.java b/libjava/classpath/gnu/classpath/jdwp/exception/InvalidSlotException.java
new file mode 100644 (file)
index 0000000..1827eda
--- /dev/null
@@ -0,0 +1,62 @@
+/* InvalidSlotException.java -- an invalid variable slot exception
+   Copyright (C) 2007 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception thrown when an invalid Slot id is used by the debugger 
+ * (i.e. when trying to access a variable slot which doesn't exist).
+ *
+ * @author Kyle Galloway (kgallowa@redhat.com)
+ */
+public class InvalidSlotException
+  extends JdwpException
+{
+  public InvalidSlotException(int slot)
+  {
+    super(JdwpConstants.Error.INVALID_SLOT, "invalid slot: " + slot);
+  }
+
+  public InvalidSlotException(String msg)
+  {
+    super(JdwpConstants.Error.INVALID_SLOT, msg);
+  }
+}
diff --git a/libjava/classpath/gnu/classpath/jdwp/exception/InvalidTagException.java b/libjava/classpath/gnu/classpath/jdwp/exception/InvalidTagException.java
new file mode 100644 (file)
index 0000000..738b5e7
--- /dev/null
@@ -0,0 +1,57 @@
+/* InvalidTagException.java -- an invalid type tag exception
+   Copyright (C) 2007 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception thrown when an invalid tag is used by
+ * the debugger
+ *
+ * @author Kyle Galloway  (kgallowa@redhat.com)
+ */
+public class InvalidTagException
+  extends JdwpException
+{
+  public InvalidTagException (byte tag)
+  {
+    super (JdwpConstants.Error.INVALID_TAG,
+       "invalid tag (" + tag + ")");
+  }
+}
diff --git a/libjava/classpath/gnu/classpath/jdwp/exception/TypeMismatchException.java b/libjava/classpath/gnu/classpath/jdwp/exception/TypeMismatchException.java
new file mode 100644 (file)
index 0000000..c6af652
--- /dev/null
@@ -0,0 +1,62 @@
+/* TypeMismatchException.java -- mismatched type of local variable
+   Copyright (C) 2007 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception throw when attempting to access a local variable of the wrong
+ * type.
+ *
+ * @author Kyle Galloway  (kgallowa@redhat.com)
+ */
+public class TypeMismatchException
+  extends JdwpException
+{
+  public TypeMismatchException(byte tag)
+  {
+    super(JdwpConstants.Error.TYPE_MISMATCH, "incorrect tag: " + tag);
+  }
+
+  public TypeMismatchException(String msg)
+  {
+    super(JdwpConstants.Error.TYPE_MISMATCH, msg);
+  }
+}
diff --git a/libjava/classpath/gnu/classpath/jdwp/id/NullObjectId.java b/libjava/classpath/gnu/classpath/jdwp/id/NullObjectId.java
new file mode 100644 (file)
index 0000000..0e7b5e3
--- /dev/null
@@ -0,0 +1,79 @@
+/* NullObjectId.java -- special objectId for null values
+   Copyright (C) 2007 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.jdwp.id;
+
+import gnu.classpath.jdwp.exception.InvalidObjectException;
+import gnu.classpath.jdwp.util.NullObject;
+
+import java.lang.ref.SoftReference;
+
+/**
+ * This is a special case of an ObjectId.  When a varaible slot contains
+ * null as its value, this is a valid value despite the fact that it does
+ * not reference an object.  To represent this, this will always be the id
+ * of the NullObject (0).
+ *
+ * @author Kyle Galloway  <kgallowa@redhat.com>
+ */
+public class NullObjectId
+  extends ObjectId
+{
+  /**
+   * The object class that this id represents
+   */
+  public static final Class typeClass = NullObject.class;
+  
+  /**
+   * Constructs a new <code>NullObjectId</code>
+   */
+  public NullObjectId()
+  {
+    super();
+    setId((long) 0);
+    _reference = new SoftReference<NullObject>(new NullObject());
+    try
+      {
+        disableCollection();
+      }
+    catch(InvalidObjectException ex)
+      {
+        //This will not happen
+      }
+  }
+
+}
index a9dc6cc815faf05fe7e70c636900a91fbd2746fe..0da0154d9d286c56c119c29a603a74139f1ec4ae 100644 (file)
@@ -1,6 +1,6 @@
 /* ArrayReferenceCommandSet.java -- class to implement the Array
    Reference Command Set
-   Copyright (C) 2005 Free Software Foundation
+   Copyright (C) 2005, 2007 Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -46,7 +46,8 @@ import gnu.classpath.jdwp.exception.JdwpException;
 import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
 import gnu.classpath.jdwp.exception.NotImplementedException;
 import gnu.classpath.jdwp.id.ObjectId;
-import gnu.classpath.jdwp.util.Value;
+import gnu.classpath.jdwp.value.Value;
+import gnu.classpath.jdwp.value.ValueFactory;
 
 import java.io.DataOutputStream;
 import java.io.IOException;
@@ -150,11 +151,11 @@ public class ArrayReferenceCommandSet
     // tagged
     for (int i = first; i < first + length; i++)
       {
-        Object value = Array.get(array, i);
+        Value val = ValueFactory.createFromObject(Array.get(array, i), clazz);
         if (clazz.isPrimitive())
-          Value.writeUntaggedValue(os, value);
+          val.writeUntagged(os);
         else
-          Value.writeTaggedValue(os, value);
+          val.writeTagged(os);
       }
   }
 
@@ -168,7 +169,7 @@ public class ArrayReferenceCommandSet
     Class type = array.getClass().getComponentType();
     for (int i = first; i < first + length; i++)
       {
-        Object value = Value.getUntaggedObj(bb, type);
+        Object value = Value.getUntaggedObject(bb, type);
         Array.set(array, i, value);
       }
   }
index a3a7ca05e593d2bbbfc876d6f960cbc7fec30c35..b29b5710f91e9ceea07bf3324bc70503298e52d0 100644 (file)
@@ -1,6 +1,6 @@
 /* ClassTypeCommandSet.java -- class to implement the ClassType
    Command Set
-   Copyright (C) 2005 Free Software Foundation
+   Copyright (C) 2005, 2007 Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -49,7 +49,8 @@ import gnu.classpath.jdwp.exception.NotImplementedException;
 import gnu.classpath.jdwp.id.ObjectId;
 import gnu.classpath.jdwp.id.ReferenceTypeId;
 import gnu.classpath.jdwp.util.MethodResult;
-import gnu.classpath.jdwp.util.Value;
+import gnu.classpath.jdwp.value.Value;
+import gnu.classpath.jdwp.value.ValueFactory;
 
 import java.io.DataOutputStream;
 import java.io.IOException;
@@ -128,7 +129,7 @@ public class ClassTypeCommandSet
       {
         ObjectId fieldId = idMan.readObjectId(bb);
         Field field = (Field) (fieldId.getObject());
-        Object value = Value.getUntaggedObj(bb, field.getType());
+        Object value = Value.getUntaggedObject(bb, field.getType());
         try
           {
             field.setAccessible(true); // Might be a private field
@@ -154,7 +155,8 @@ public class ClassTypeCommandSet
     Exception exception = mr.getThrownException();
     ObjectId eId = idMan.getObjectId(exception);
 
-    Value.writeTaggedValue(os, value);
+    Value val = ValueFactory.createFromObject(value, mr.getResultType());
+    val.writeTagged(os);
     eId.writeTagged(os);
   }
 
@@ -192,7 +194,7 @@ public class ClassTypeCommandSet
 
     for (int i = 0; i < args; i++)
       {
-        values[i] = Value.getObj(bb);
+        values[i] = Value.getTaggedObject(bb);
       }
 
     int invokeOpts = bb.getInt();
@@ -207,6 +209,8 @@ public class ClassTypeCommandSet
         MethodResult mr = VMVirtualMachine.executeMethod(null, thread,
                                                         clazz, method,
                                                         values, false);
+        mr.setResultType(method.getReturnType());
+        
         if (suspend)
          VMVirtualMachine.resumeAllThreads ();
 
index 59cfb94d39b7111bdc22096cd28f8a94baa39a3a..d7ebbc3a358dd1d6891f3bd4d1530e75608ff767 100644 (file)
@@ -1,6 +1,6 @@
 /* EventRequestCommandSet.java -- class to implement the EventRequest Command
    Set
-   Copyright (C) 2005 Free Software Foundation
+   Copyright (C) 2005, 2007 Free Software Foundation
  
 This file is part of GNU Classpath.
 
@@ -40,6 +40,7 @@ exception statement from your version. */
 package gnu.classpath.jdwp.processor;
 
 import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.VMVirtualMachine;
 import gnu.classpath.jdwp.event.EventManager;
 import gnu.classpath.jdwp.event.EventRequest;
 import gnu.classpath.jdwp.event.filters.ClassExcludeFilter;
@@ -113,6 +114,28 @@ public class EventRequestCommandSet
     byte suspendPolicy = bb.get();
     int modifiers = bb.getInt();
 
+    switch (eventKind)
+      {
+       case JdwpConstants.EventKind.FIELD_ACCESS:
+       if (!VMVirtualMachine.canWatchFieldAccess)
+         {
+           String msg = "watching field accesses is not supported";
+           throw new NotImplementedException(msg);
+         }
+       break;
+
+       case JdwpConstants.EventKind.FIELD_MODIFICATION:
+       if (!VMVirtualMachine.canWatchFieldModification)
+         {
+           String msg = "watching field modifications is not supported";
+           throw new NotImplementedException(msg);
+         }
+       break;
+
+      default:
+       // okay
+      }
+
     EventRequest eventReq = new EventRequest(eventKind, suspendPolicy);
     IEventFilter filter = null;
     ReferenceTypeId refId;
index dcfe7a6fc84d03f43348a9c9ab9186bb4e9b2143..4d1bf709800564cfee7ccfa17007c22cc895ecf1 100644 (file)
@@ -1,5 +1,5 @@
 /* MethodCommandSet.java -- class to implement the Method Command Set
-   Copyright (C) 2005, 2006 Free Software Foundation
+   Copyright (C) 2005, 2006, 2007 Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -40,10 +40,11 @@ package gnu.classpath.jdwp.processor;
 
 import gnu.classpath.jdwp.JdwpConstants;
 import gnu.classpath.jdwp.VMMethod;
+import gnu.classpath.jdwp.VMVirtualMachine;
 import gnu.classpath.jdwp.exception.JdwpException;
 import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
 import gnu.classpath.jdwp.exception.NotImplementedException;
-import gnu.classpath.jdwp.id.ClassReferenceTypeId;
+import gnu.classpath.jdwp.id.ReferenceTypeId;
 import gnu.classpath.jdwp.util.LineTable;
 import gnu.classpath.jdwp.util.VariableTable;
 
@@ -99,8 +100,7 @@ public class MethodCommandSet
   private void executeLineTable(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ClassReferenceTypeId refId
-      = (ClassReferenceTypeId) idMan.readReferenceTypeId(bb);
+    ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
     Class clazz = refId.getType();
 
     VMMethod method = VMMethod.readId(clazz, bb);
@@ -111,8 +111,7 @@ public class MethodCommandSet
   private void executeVariableTable(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-   ClassReferenceTypeId refId
-     = (ClassReferenceTypeId) idMan.readReferenceTypeId(bb);
+    ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
     Class clazz = refId.getType();
 
     VMMethod method = VMMethod.readId(clazz, bb);
@@ -121,11 +120,20 @@ public class MethodCommandSet
   }
 
   private void executeByteCodes(ByteBuffer bb, DataOutputStream os)
-      throws JdwpException
+    throws JdwpException, IOException
   {
-    // This command is optional, determined by VirtualMachines CapabilitiesNew
-    // so we'll leave it till later to implement
-    throw new NotImplementedException("Command ByteCodes not implemented.");
+    if (!VMVirtualMachine.canGetBytecodes)
+      {
+       String msg = "getting bytecodes is unsupported";
+       throw new NotImplementedException(msg);
+      }
+
+    ReferenceTypeId id = idMan.readReferenceTypeId(bb);
+    Class klass = id.getType();
+    VMMethod method = VMMethod.readId(klass, bb);
+    byte[] bytecode = VMVirtualMachine.getBytecodes(method);
+    os.writeInt(bytecode.length);
+    os.write(bytecode);
   }
 
   private void executeIsObsolete(ByteBuffer bb, DataOutputStream os)
@@ -143,7 +151,7 @@ public class MethodCommandSet
   {
     // We don't have generics yet
     throw new NotImplementedException(
-      "Command SourceDebugExtension not implemented.");
+      "Command VariableTableWithGeneric not implemented.");
   }
 
 }
index ef421ea5b286ab75378e9823eda8b0a31dd51d1d..ed83fd2f94b7c67b5c1efb33be614ed688b6d809 100644 (file)
@@ -1,6 +1,6 @@
 /* ObjectReferenceCommandSet.java -- class to implement the ObjectReference
    Command Set
-   Copyright (C) 2005 Free Software Foundation
+   Copyright (C) 2005, 2007 Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -47,8 +47,10 @@ import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
 import gnu.classpath.jdwp.exception.NotImplementedException;
 import gnu.classpath.jdwp.id.ObjectId;
 import gnu.classpath.jdwp.id.ReferenceTypeId;
-import gnu.classpath.jdwp.util.Value;
 import gnu.classpath.jdwp.util.MethodResult;
+import gnu.classpath.jdwp.util.MonitorInfo;
+import gnu.classpath.jdwp.value.Value;
+import gnu.classpath.jdwp.value.ValueFactory;
 
 import java.io.DataOutputStream;
 import java.io.IOException;
@@ -137,7 +139,9 @@ public class ObjectReferenceCommandSet
           {
             field.setAccessible(true); // Might be a private field
             Object value = field.get(obj);
-            Value.writeTaggedValue(os, value);
+            Value val = ValueFactory.createFromObject(value, 
+                                                      field.getType());
+            val.writeTagged(os);
           }
         catch (IllegalArgumentException ex)
           {
@@ -163,7 +167,7 @@ public class ObjectReferenceCommandSet
     for (int i = 0; i < numFields; i++)
       {
         Field field = (Field) idMan.readObjectId(bb).getObject();
-        Object value = Value.getUntaggedObj(bb, field.getType());
+        Object value = Value.getUntaggedObject(bb, field.getType());
         try
           {
             field.setAccessible(true); // Might be a private field
@@ -183,13 +187,18 @@ public class ObjectReferenceCommandSet
   }
 
   private void executeMonitorInfo(ByteBuffer bb, DataOutputStream os)
-    throws JdwpException
+    throws JdwpException, IOException
   {
-    // This command is optional, determined by VirtualMachines CapabilitiesNew
-    // so we'll leave it till later to implement
-    throw new NotImplementedException(
-      "Command ExecuteMonitorInfo not implemented.");
+    if (!VMVirtualMachine.canGetMonitorInfo)
+      {
+       String msg = "getting monitor info not supported";
+       throw new NotImplementedException(msg);
+      }
 
+    ObjectId oid = idMan.readObjectId(bb);
+    Object obj = oid.getObject();
+    MonitorInfo info = VMVirtualMachine.getMonitorInfo(obj);
+    info.write(os);
   }
 
   private void executeInvokeMethod(ByteBuffer bb, DataOutputStream os)
@@ -212,7 +221,7 @@ public class ObjectReferenceCommandSet
 
     for (int i = 0; i < args; i++)
       {
-        values[i] = Value.getObj(bb);
+        values[i] = Value.getTaggedObject(bb);
       }
 
     int invokeOptions = bb.getInt();
@@ -232,11 +241,14 @@ public class ObjectReferenceCommandSet
     MethodResult mr = VMVirtualMachine.executeMethod(obj, thread,
                                                     clazz, method,
                                                     values, nonVirtual);
+    mr.setResultType (method.getReturnType());
+    
     Object value = mr.getReturnedValue();
     Exception exception = mr.getThrownException();
 
     ObjectId eId = idMan.getObjectId(exception);
-    Value.writeTaggedValue(os, value);
+    Value val = ValueFactory.createFromObject(value, mr.getResultType());
+    val.writeTagged(os);
     eId.writeTagged(os);
   }
 
index b76143f92c9e0da286a7beff26cdef2c9f29ca5a..8e8b74b9d438f86238e6c942333ff4e549ad2fe3 100644 (file)
@@ -1,6 +1,6 @@
 /* ReferenceTypeCommandSet.java -- class to implement the ReferenceType
    Command Set
-   Copyright (C) 2005, 2006 Free Software Foundation
+   Copyright (C) 2005, 2006, 2007 Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -51,7 +51,8 @@ import gnu.classpath.jdwp.id.ObjectId;
 import gnu.classpath.jdwp.id.ReferenceTypeId;
 import gnu.classpath.jdwp.util.JdwpString;
 import gnu.classpath.jdwp.util.Signature;
-import gnu.classpath.jdwp.util.Value;
+import gnu.classpath.jdwp.value.Value;
+import gnu.classpath.jdwp.value.ValueFactory;
 
 import java.io.DataOutputStream;
 import java.io.IOException;
@@ -220,7 +221,9 @@ public class ReferenceTypeCommandSet
               {
                 field.setAccessible(true); // Might be a private field
                 Object value = field.get(null);
-                Value.writeTaggedValue(os, value);
+                Value val = ValueFactory.createFromObject(value, 
+                                                          field.getType());
+                val.writeTagged(os);
               }
             catch (IllegalArgumentException ex)
               {
@@ -303,10 +306,15 @@ public class ReferenceTypeCommandSet
   private void executeSourceDebugExtension(ByteBuffer bb, DataOutputStream os)
     throws JdwpException, IOException
   {
-    // This command is optional, determined by VirtualMachines CapabilitiesNew
-    // so we'll leave it till later to implement
-    throw new NotImplementedException(
-      "Command SourceDebugExtension not implemented.");
+    if (!VMVirtualMachine.canGetSourceDebugExtension)
+      {
+       String msg = "source debug extension is not supported";
+       throw new NotImplementedException(msg);
+      }
+
+    ReferenceTypeId id = idMan.readReferenceTypeId(bb);
+    String ext = VMVirtualMachine.getSourceDebugExtension (id.getType());
+    JdwpString.writeString(os, ext);
   }
 
   private void executeSignatureWithGeneric(ByteBuffer bb, DataOutputStream os)
@@ -314,7 +322,7 @@ public class ReferenceTypeCommandSet
   {
     // We don't have generics yet
     throw new NotImplementedException(
-      "Command SourceDebugExtension not implemented.");
+      "Command SignatureWithGeneric not implemented.");
   }
 
   private void executeFieldWithGeneric(ByteBuffer bb, DataOutputStream os)
@@ -322,7 +330,7 @@ public class ReferenceTypeCommandSet
   {
     // We don't have generics yet
     throw new NotImplementedException(
-      "Command SourceDebugExtension not implemented.");
+      "Command executeFieldWithGeneric not implemented.");
   }
 
   private void executeMethodsWithGeneric(ByteBuffer bb, DataOutputStream os)
@@ -330,6 +338,6 @@ public class ReferenceTypeCommandSet
   {
     // We don't have generics yet
     throw new NotImplementedException(
-      "Command SourceDebugExtension not implemented.");
+      "Command executeMethodsWithGeneric not implemented.");
   }
 }
index cf1e8c272dab43c911e66eed3aed67a9c3648443..2d90e8064ae56c9456a8a1a9954743f68ddd30c9 100644 (file)
@@ -45,8 +45,10 @@ import gnu.classpath.jdwp.VMVirtualMachine;
 import gnu.classpath.jdwp.exception.JdwpException;
 import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
 import gnu.classpath.jdwp.exception.NotImplementedException;
-import gnu.classpath.jdwp.id.ObjectId;
-import gnu.classpath.jdwp.util.Value;
+import gnu.classpath.jdwp.id.ThreadId;
+import gnu.classpath.jdwp.value.ObjectValue;
+import gnu.classpath.jdwp.value.Value;
+import gnu.classpath.jdwp.value.ValueFactory;
 
 import java.io.DataOutputStream;
 import java.io.IOException;
@@ -98,8 +100,8 @@ public class StackFrameCommandSet
   private void executeGetValues(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ObjectId tId = idMan.readObjectId(bb);
-    Thread thread = (Thread) tId.getObject();
+    ThreadId tId = (ThreadId) idMan.readObjectId(bb);
+    Thread thread = tId.getThread();
 
     // Although Frames look like other ids they are not. First they are not
     // ObjectIds since they don't exist in the users code. Storing them as an
@@ -115,16 +117,16 @@ public class StackFrameCommandSet
       {
         int slot = bb.getInt();
         byte sig = bb.get();
-        Object val = frame.getValue(slot);
-        Value.writeTaggedValue(os, val);
+        Value val = frame.getValue(slot, sig);
+        val.writeTagged(os);
       }
   }
 
   private void executeSetValues(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ObjectId tId = idMan.readObjectId(bb);
-    Thread thread = (Thread) tId.getObject();
+    ThreadId tId = (ThreadId) idMan.readObjectId(bb);
+    Thread thread = tId.getThread();
 
     long frameID = bb.getLong();
     VMFrame frame = VMVirtualMachine.getFrame(thread, frameID);
@@ -133,7 +135,7 @@ public class StackFrameCommandSet
     for (int i = 0; i < slots; i++)
       {
         int slot = bb.getInt();
-        Object value = Value.getObj(bb);
+        Value value = ValueFactory.createFromTagged(bb);
         frame.setValue(slot, value);
       }
   }
@@ -141,21 +143,28 @@ public class StackFrameCommandSet
   private void executeThisObject(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ObjectId tId = idMan.readObjectId(bb);
-    Thread thread = (Thread) tId.getObject();
+    ThreadId tId = (ThreadId) idMan.readObjectId(bb);
+    Thread thread = tId.getThread();
 
     long frameID = bb.getLong();
     VMFrame frame = VMVirtualMachine.getFrame(thread, frameID);
 
-    Object thisObject = frame.getObject();
-    Value.writeTaggedValue(os, thisObject);
+    ObjectValue objVal = new ObjectValue(frame.getObject());
+    objVal.writeTagged(os);
   }
 
   private void executePopFrames(ByteBuffer bb, DataOutputStream os)
-      throws JdwpException
+    throws JdwpException, IOException
   {
-    // This command is optional, determined by VirtualMachines CapabilitiesNew
-    // so we'll leave it till later to implement
-    throw new NotImplementedException("Command PopFrames not implemented.");
+    if (!VMVirtualMachine.canPopFrames)
+      {
+       String msg = "popping frames is unsupported";
+       throw new NotImplementedException(msg);
+      }
+
+    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
+    Thread thread = tid.getThread();
+    long fid = bb.getLong();
+    VMVirtualMachine.popFrames(thread, fid);
   }
 }
index fd7fa743e7aa621cdc66b81ea8b87155ff84e201..0dd10200bf30400ee0513fb44c469f294d04ae99 100644 (file)
@@ -1,5 +1,5 @@
 /* ThreadReferenceCommandSet.java -- class to implement the ThreadReference
-   Command Set Copyright (C) 2005 Free Software Foundation
+   Command Set Copyright (C) 2005, 2007 Free Software Foundation
  
 This file is part of GNU Classpath.
 
@@ -198,22 +198,42 @@ public class ThreadReferenceCommandSet
   }
 
   private void executeOwnedMonitors(ByteBuffer bb, DataOutputStream os)
-      throws JdwpException
+    throws JdwpException, IOException
   {
-    // This command is optional, determined by VirtualMachines CapabilitiesNew
-    // so we'll leave it till later to implement
-    throw new NotImplementedException(
-      "Command OwnedMonitors not implemented.");
+    if (!VMVirtualMachine.canGetOwnedMonitorInfo)
+      {
+       String msg = "getting owned monitors is not supported";
+       throw new NotImplementedException(msg);
+      }
+
+    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
+    Thread thread = tid.getThread();
+    Object[] monitors = VMVirtualMachine.getOwnedMonitors(thread);
+
+    os.write(monitors.length);
+    for (int i = 0; i < monitors.length; ++i)
+      {
+       ObjectId id = idMan.getObjectId(monitors[i]);
+       id.writeTagged(os);
+      }
   }
 
   private void executeCurrentContendedMonitor(ByteBuffer bb,
                                               DataOutputStream os)
-      throws JdwpException
+    throws JdwpException, IOException
   {
-    // This command is optional, determined by VirtualMachines CapabilitiesNew
-    // so we'll leave it till later to implement
-    throw new NotImplementedException(
-      "Command CurrentContentedMonitors not implemented.");
+    if (!VMVirtualMachine.canGetCurrentContendedMonitor)
+      {
+       String msg = "getting current contended monitor is not supported";
+       throw new NotImplementedException(msg);
+      }
+
+    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
+    Thread thread = tid.getThread();
+
+    Object monitor = VMVirtualMachine.getCurrentContendedMonitor(thread);
+    ObjectId id = idMan.getObjectId(monitor);
+    id.writeTagged(os);
   }
 
   private void executeStop(ByteBuffer bb, DataOutputStream os)
index a7edb287a56fa0866241ab0380d9f58af738d64e..e2703908ba24ce1879ec1aa8cdbf8766d6db5fce 100644 (file)
@@ -1,6 +1,6 @@
 /* VirtualMachineCommandSet.java -- class to implement the VirtualMachine
    Command Set
-   Copyright (C) 2005, 2006 Free Software Foundation
+   Copyright (C) 2005, 2006, 2007 Free Software Foundation
  
 This file is part of GNU Classpath.
 
@@ -54,6 +54,7 @@ import java.io.DataOutputStream;
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Iterator;
 import java.util.Properties;
 
@@ -179,7 +180,8 @@ public class VirtualMachineCommandSet
     ArrayList allMatchingClasses = new ArrayList();
 
     // This will be an Iterator over all loaded Classes
-    Iterator iter = VMVirtualMachine.getAllLoadedClasses();
+    Collection classes = VMVirtualMachine.getAllLoadedClasses();
+    Iterator iter = classes.iterator ();
 
     while (iter.hasNext())
       {
@@ -203,22 +205,11 @@ public class VirtualMachineCommandSet
   private void executeAllClasses(ByteBuffer bb, DataOutputStream os)
     throws JdwpException, IOException
   {
-    // Disable garbage collection while we're collecting the info on loaded
-    // classes so we some classes don't get collected between the time we get
-    // the count and the time we get the list
-    //VMVirtualMachine.disableGarbageCollection();
+    Collection classes = VMVirtualMachine.getAllLoadedClasses();
+    os.writeInt(classes.size ());
 
-    int classCount = VMVirtualMachine.getAllLoadedClassesCount();
-    os.writeInt(classCount);
-
-    // This will be an Iterator over all loaded Classes
-    Iterator iter = VMVirtualMachine.getAllLoadedClasses();
-    //VMVirtualMachine.enableGarbageCollection();
-    int count = 0;
-
-    // Note it's possible classes were created since out classCount so make
-    // sure we don't write more classes than we told the debugger
-    while (iter.hasNext() && count++ < classCount)
+    Iterator iter = classes.iterator ();
+    while (iter.hasNext())
       {
         Class clazz = (Class) iter.next();
         ReferenceTypeId id = idMan.getReferenceTypeId(clazz);
@@ -340,14 +331,13 @@ public class VirtualMachineCommandSet
   private void executeCapabilities(ByteBuffer bb, DataOutputStream os)
     throws JdwpException, IOException
   {
-    // Store these somewhere?
-    os.writeBoolean(false); // canWatchFieldModification
-    os.writeBoolean(false); // canWatchFieldAccess
-    os.writeBoolean(false); // canGetBytecodes
-    os.writeBoolean(false); // canGetSyntheticAttribute
-    os.writeBoolean(false); // canGetOwnedMonitorInfo
-    os.writeBoolean(false); // canGetCurrentContendedMonitor
-    os.writeBoolean(false); // canGetMonitorInfo
+    os.writeBoolean(VMVirtualMachine.canWatchFieldModification);
+    os.writeBoolean(VMVirtualMachine.canWatchFieldAccess);
+    os.writeBoolean(VMVirtualMachine.canGetBytecodes);
+    os.writeBoolean(VMVirtualMachine.canGetSyntheticAttribute);
+    os.writeBoolean(VMVirtualMachine.canGetOwnedMonitorInfo);
+    os.writeBoolean(VMVirtualMachine.canGetCurrentContendedMonitor);
+    os.writeBoolean(VMVirtualMachine.canGetMonitorInfo);
   }
 
   private void executeClassPaths(ByteBuffer bb, DataOutputStream os)
@@ -401,43 +391,60 @@ public class VirtualMachineCommandSet
   private void executeCapabilitiesNew(ByteBuffer bb, DataOutputStream os)
     throws JdwpException, IOException
   {
-    // Store these somewhere?
     final int CAPABILITIES_NEW_SIZE = 32;
-    os.writeBoolean(false); // canWatchFieldModification
-    os.writeBoolean(false); // canWatchFieldAccess
-    os.writeBoolean(false); // canGetBytecodes
-    os.writeBoolean(false); // canGetSyntheticAttribute
-    os.writeBoolean(false); // canGetOwnedMonitorInfo
-    os.writeBoolean(false); // canGetCurrentContendedMonitor
-    os.writeBoolean(false); // canGetMonitorInfo
-    os.writeBoolean(false); // canRedefineClasses
-    os.writeBoolean(false); // canAddMethod
-    os.writeBoolean(false); // canUnrestrictedlyRedefineClasses
-    os.writeBoolean(false); // canPopFrames
-    os.writeBoolean(false); // canUseInstanceFilters
-    os.writeBoolean(false); // canGetSourceDebugExtension
-    os.writeBoolean(false); // canRequestVMDeathEvent
-    os.writeBoolean(false); // canSetDefaultStratum
+
+    executeCapabilities(bb, os);
+    os.writeBoolean(VMVirtualMachine.canRedefineClasses);
+    os.writeBoolean(VMVirtualMachine.canAddMethod);
+    os.writeBoolean(VMVirtualMachine.canUnrestrictedlyRedefineClasses);
+    os.writeBoolean(VMVirtualMachine.canPopFrames);
+    os.writeBoolean(VMVirtualMachine.canUseInstanceFilters);
+    os.writeBoolean(VMVirtualMachine.canGetSourceDebugExtension);
+    os.writeBoolean(VMVirtualMachine.canRequestVMDeathEvent);
+    os.writeBoolean(VMVirtualMachine.canSetDefaultStratum);
     for (int i = 15; i < CAPABILITIES_NEW_SIZE; i++)
-      // Future capabilities
-      // currently unused
-      os.writeBoolean(false); // Set to false
+      {
+       // Future capabilities (currently unused)
+       os.writeBoolean(false);
+      }
   }
 
   private void executeRedefineClasses(ByteBuffer bb, DataOutputStream os)
     throws JdwpException
   {
-    // Optional command, don't implement
-    throw new NotImplementedException(
-      "Command VirtualMachine.RedefineClasses not implemented");
+    if (!VMVirtualMachine.canRedefineClasses)
+      {
+       String msg = "redefinition of classes is not supported";
+       throw new NotImplementedException(msg);
+      }
+
+    int classes = bb.getInt();
+    Class[] types = new Class[classes];
+    byte[][] bytecodes = new byte[classes][];
+    for (int i = 0; i < classes; ++i)
+      {
+       ReferenceTypeId id = idMan.readReferenceTypeId(bb);
+       int classfile = bb.getInt();
+       byte[] bytecode = new byte[classfile];
+       bb.get(bytecode);
+       types[i] = id.getType();
+       bytecodes[i] = bytecode;
+      }
+
+    VMVirtualMachine.redefineClasses (types, bytecodes);
   }
 
   private void executeSetDefaultStratum(ByteBuffer bb, DataOutputStream os)
     throws JdwpException
   {
-    // Optional command, don't implement
-    throw new NotImplementedException(
-      "Command VirtualMachine.SetDefaultStratum not implemented");
+    if (!VMVirtualMachine.canSetDefaultStratum)
+      {
+       String msg = "setting the default stratum is not supported";
+       throw new NotImplementedException(msg);
+      }
+
+    String stratum = JdwpString.readString(bb);
+    VMVirtualMachine.setDefaultStratum(stratum);
   }
 
   private void executeAllClassesWithGeneric(ByteBuffer bb, DataOutputStream os)
index a9c1b330579199b8737498f8b808bd6f6522daea..190511de83f40c47fb22cc927309baeb59e7c2df 100644 (file)
@@ -52,6 +52,9 @@ public class MethodResult
   
   // Any Exception that was thrown by the executing method
   private Exception thrownException;
+  
+  // The type of this result
+  private Class resType;
 
   public Object getReturnedValue()
   {
@@ -73,4 +76,14 @@ public class MethodResult
     this.thrownException = thrownException;
   }
   
+  public Class getResultType()
+  {
+    return resType;
+  }
+  
+  public void setResultType(Class type)
+  {
+    resType = type;
+  }
+  
 }
diff --git a/libjava/classpath/gnu/classpath/jdwp/util/MonitorInfo.java b/libjava/classpath/gnu/classpath/jdwp/util/MonitorInfo.java
new file mode 100644 (file)
index 0000000..f28eabf
--- /dev/null
@@ -0,0 +1,76 @@
+/* MonitorInfo.java -- class used to return monitor information
+   for JDWP.
+
+   Copyright (C) 2007 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.util;
+
+import gnu.classpath.jdwp.VMIdManager;
+import gnu.classpath.jdwp.id.ObjectId;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * This class is used to pass monitor information between
+ * the JDWP back-end and the virtual machine.
+ *
+ * @author Keith Seitz  (keiths@redhat.com)
+ */
+public class MonitorInfo
+{
+  public int entryCount;
+  public Thread owner;
+  public Thread[] waiters;
+
+  public void write(DataOutputStream os)
+    throws IOException
+  {
+    VMIdManager idm = VMIdManager.getDefault();
+    ObjectId id = idm.getObjectId(owner);
+    id.write(os);
+    os.write(entryCount);
+    os.write(waiters.length);
+    for (int i = 0; i < waiters.length; ++i)
+      {
+       id = idm.getObjectId(waiters[i]);
+       id.write(os);
+      }
+  }
+}
diff --git a/libjava/classpath/gnu/classpath/jdwp/util/NullObject.java b/libjava/classpath/gnu/classpath/jdwp/util/NullObject.java
new file mode 100644 (file)
index 0000000..ec762fc
--- /dev/null
@@ -0,0 +1,50 @@
+/* NullObject.java -- placeholder for null values
+   Copyright (C) 2007 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.jdwp.util;
+
+/**
+ * This is a placeholder for null.  There are several places in JDWP where null
+ * is a valid value (i.e. when geting the value of a variable slot that
+ * contains a null reference at that time).  This class distinguishes between
+ * these "meaningful" null values and invalid null pointers.
+ *
+ * @author Kyle Galloway  <kgallowa@redhat.com>
+ */
+public class NullObject
+{
+}
index 414c4a33b8299fc84591319e8a84c24eb33257f9..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,301 +0,0 @@
-/* Value.java -- class to read/write JDWP tagged and untagged values
-   Copyright (C) 2005, 2006, Free Software Foundation
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING.  If not, write to the
-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library.  Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module.  An independent module is a module which is not derived from
-or based on this library.  If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so.  If you do not wish to do so, delete this
-exception statement from your version. */
-
-
-package gnu.classpath.jdwp.util;
-
-import gnu.classpath.jdwp.JdwpConstants;
-import gnu.classpath.jdwp.VMIdManager;
-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.ObjectId;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-
-/**
- * A class to read/write JDWP tagged and untagged values.
- * 
- * @author Aaron Luchko <aluchko@redhat.com>
- */
-public class Value
-{
-  /**
-   * Will write the given object as an untagged value to the DataOutputStream.
-   * 
-   * @param os write the value here
-   * @param obj the Object to write
-   * @throws IOException
-   * @throws InvalidFieldException
-   */  
-  public static void writeUntaggedValue(DataOutputStream os, Object obj)
-    throws JdwpException, IOException
-  {
-    writeValue(os, obj, false);
-  }
-  
-  /**
-   * Will write the given object as a tagged value to the DataOutputStream.
-   * 
-   * @param os write the value here
-   * @param obj the Object to write
-   * @throws IOException
-   * @throws InvalidFieldException
-   */
-  public static void writeTaggedValue(DataOutputStream os, Object obj)
-    throws JdwpException, IOException
-  {
-    writeValue(os, obj, true);
-  }
-  
-  /**
-   * Will write the given object as either a value or an untagged value to the
-   * DataOutputStream.
-   * 
-   * @param os write the value here
-   * @param obj the Object to write
-   * @param tagged true if the value is tagged, false otherwise
-   * @throws IOException
-   * @throws InvalidFieldException
-   */
-  private static void writeValue(DataOutputStream os, Object obj,
-                                boolean tagged)
-    throws IOException, JdwpException
-  {
-    Class clazz = obj.getClass();
-    if (clazz.isPrimitive())
-      {
-        if (clazz == byte.class)
-          {
-            if (tagged)
-              os.writeByte(JdwpConstants.Tag.BYTE);
-            os.writeByte(((Byte) obj).byteValue());
-          }
-        else if (clazz == char.class)
-          {
-            if (tagged)
-              os.writeByte(JdwpConstants.Tag.CHAR);
-            os.writeChar(((Character) obj).charValue());
-          }
-        else if (clazz == float.class)
-          {
-            if (tagged)
-              os.writeByte(JdwpConstants.Tag.FLOAT);
-            os.writeFloat(((Float) obj).floatValue());
-          }
-        else if (clazz == double.class)
-          {
-            if (tagged)
-              os.writeByte(JdwpConstants.Tag.DOUBLE);
-            os.writeDouble(((Double) obj).doubleValue());
-          }
-        else if (clazz == int.class)
-          {
-            if (tagged)
-              os.writeByte(JdwpConstants.Tag.BYTE);
-            os.writeInt(((Integer) obj).intValue());
-          }
-        else if (clazz == long.class)
-          {
-            if (tagged)
-              os.writeByte(JdwpConstants.Tag.LONG);
-            os.writeLong(((Long) obj).longValue());
-          }
-        else if (clazz == short.class)
-          {
-            if (tagged)
-              os.writeByte(JdwpConstants.Tag.SHORT);
-            os.writeInt(((Short) obj).shortValue());
-          }
-        else if (clazz == void.class)
-          { // A 'void' has no data
-            if (tagged)
-              os.writeByte(JdwpConstants.Tag.VOID);
-          }
-        else if (clazz == boolean.class)
-          {
-            if (tagged)
-              os.writeByte(JdwpConstants.Tag.BOOLEAN);
-            os.writeBoolean(((Boolean) obj).booleanValue());
-          }
-        else
-          { // This shouldn't be possible
-            throw new JdwpInternalErrorException(
-              "Field has invalid primitive!");
-          }
-      }
-    else
-      {
-        // Object is an Object, not a primitive type wrapped in an object
-        // Write the appropriate tag
-        if (tagged)
-          {
-            if (clazz.isArray())
-              os.writeByte(JdwpConstants.Tag.ARRAY);
-            else if (obj instanceof String)
-              os.writeByte(JdwpConstants.Tag.STRING);
-            else if (obj instanceof Thread)
-              os.writeByte(JdwpConstants.Tag.THREAD);
-            else if (obj instanceof ThreadGroup)
-              os.writeByte(JdwpConstants.Tag.THREAD_GROUP);
-            else if (obj instanceof ClassLoader)
-              os.writeByte(JdwpConstants.Tag.CLASS_LOADER);
-            else if (obj instanceof Class)
-              os.writeByte(JdwpConstants.Tag.CLASS_OBJECT);
-            else
-              os.writeByte(JdwpConstants.Tag.OBJECT);
-          }
-        ObjectId oid = VMIdManager.getDefault().getObjectId(obj);
-        oid.write(os);
-      }
-  }
-
-  /**
-   * Reads the appropriate object for the tagged value contained in the 
-   * ByteBuffer.
-   * 
-   * @param bb contains the Object
-   * @return The Object referenced by the value
-   * @throws JdwpException
-   * @throws IOException
-   */
-  public static Object getObj(ByteBuffer bb)
-    throws JdwpException, IOException
-  {
-    return getUntaggedObj(bb, bb.get());
-  }
-
-  /**
-   * Reads an object of the given Class from the untagged value contained
-   * in the ByteBuffer.
-   * 
-   * @param bb   contains the Object
-   * @param type corresponds to the TAG of value to be read 
-   * @return the resultant object
-   * @throws JdwpException
-   * @throws IOException
-   */
-  public static Object getUntaggedObj(ByteBuffer bb, Class type)
-    throws JdwpException, IOException
-  {
-    if (type.isPrimitive())
-      {
-        if (type == byte.class)
-          return new Byte(bb.get());
-        else if (type == char.class)
-          return new Character(bb.getChar());
-        else if (type == float.class)
-          return new Float(bb.getFloat());
-        else if (type == double.class)
-          return new Double(bb.getDouble());
-        else if (type == int.class)
-          return new Integer(bb.getInt());
-        else if (type == long.class)
-          return new Long(bb.getLong());
-        else if (type == short.class)
-          return new Short(bb.getShort());
-        else if (type == boolean.class)
-          return Boolean.valueOf(bb.get() != 0);
-        else if (type == void.class)
-          return new byte[0];
-        else
-          { // This shouldn't be possible
-            throw new JdwpInternalErrorException(
-              "Field has invalid primitive!");
-          }
-      }
-    else
-      {
-        // Field is an object
-        ObjectId oid = VMIdManager.getDefault().readObjectId(bb);
-        return oid.getObject();
-      }
-  }
-
-  /**
-   * Reads the an object of the given Class from the untagged value contained
-   * in the ByteBuffer.
-   * 
-   * @param bb contains the Object
-   * @param tag TAG of the Value to be read
-   * @return the object
-   * @throws JdwpException
-   * @throws IOException
-   */
-  public static Object getUntaggedObj(ByteBuffer bb, byte tag)
-    throws JdwpException, IOException
-  {
-    switch (tag)
-      {
-      case JdwpConstants.Tag.BYTE:
-        return new Byte(bb.get());
-      case JdwpConstants.Tag.CHAR:
-        return new Character(bb.getChar());
-      case JdwpConstants.Tag.FLOAT:
-        return new Float(bb.getFloat());
-      case JdwpConstants.Tag.DOUBLE:
-        return new Double(bb.getDouble());
-      case JdwpConstants.Tag.INT:
-        return new Integer(bb.getInt());
-      case JdwpConstants.Tag.LONG:
-        return new Long(bb.getLong());
-      case JdwpConstants.Tag.SHORT:
-        return new Short(bb.getShort());
-      case JdwpConstants.Tag.VOID:
-        return new byte[0];
-      case JdwpConstants.Tag.BOOLEAN:
-        return (bb.get() == 0) ? new Boolean(false) : new Boolean(true);
-      case JdwpConstants.Tag.STRING:
-        return JdwpString.readString(bb);
-      case JdwpConstants.Tag.ARRAY:
-      case JdwpConstants.Tag.THREAD:
-      case JdwpConstants.Tag.OBJECT:
-      case JdwpConstants.Tag.THREAD_GROUP:
-      case JdwpConstants.Tag.CLASS_LOADER:
-      case JdwpConstants.Tag.CLASS_OBJECT:
-        // All these cases are ObjectIds
-        ObjectId oid = VMIdManager.getDefault().readObjectId(bb);
-        return oid.getObject();
-      default:
-        throw new NotImplementedException("Tag " + tag
-                                          + " is not implemented.");
-      }
-  }
-}
diff --git a/libjava/classpath/gnu/classpath/jdwp/value/BooleanValue.java b/libjava/classpath/gnu/classpath/jdwp/value/BooleanValue.java
new file mode 100644 (file)
index 0000000..42bb806
--- /dev/null
@@ -0,0 +1,100 @@
+/* BooleanValue.java -- JDWP wrapper class for a boolean value
+   Copyright (C) 2007 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.jdwp.value;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * Wrapper for an boolean value.
+ * 
+ * @author Kyle Galloway <kgallowa@redhat.com>
+ */
+public final class BooleanValue
+    extends Value
+{
+  // The boolean wrapped by this class
+  boolean _value;
+
+  /**
+   * Create a new BooleanValue from an boolean
+   * 
+   * @param value the boolean to wrap
+   */
+  public BooleanValue(boolean value)
+  {
+    super(JdwpConstants.Tag.BOOLEAN);
+    _value = value;
+  }
+  
+  /**
+   * Get the value held in this Value
+   * 
+   * @return the value represented by this Value object
+   */
+  public boolean getValue()
+  {
+    return _value;
+  }
+  
+  /**
+   * Return an object representing this type
+   * 
+   * @return an Object represntation of this value
+   */
+  @Override
+  protected Object getObject()
+  {
+    return new Boolean(_value);
+  }
+
+  /**
+   * Write the wrapped boolean to the given DataOutputStream.
+   * 
+   * @param os the output stream to write to
+   */
+  @Override
+  protected void write(DataOutputStream os)
+    throws IOException
+  {
+    os.writeBoolean(_value);
+  }
+}
+
diff --git a/libjava/classpath/gnu/classpath/jdwp/value/ByteValue.java b/libjava/classpath/gnu/classpath/jdwp/value/ByteValue.java
new file mode 100644 (file)
index 0000000..204fe86
--- /dev/null
@@ -0,0 +1,99 @@
+/* ByteValue.java -- JDWP wrapper class for a byte value
+   Copyright (C) 2007 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.jdwp.value;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * Wrapper for an byte value.
+ * 
+ * @author Kyle Galloway <kgallowa@redhat.com>
+ */
+public final class ByteValue
+    extends Value
+{
+  // The byte wrapped by this class
+  byte _value;
+
+  /**
+   * Create a new ByteValue from an byte
+   * 
+   * @param value the byte to wrap
+   */
+  public ByteValue(byte value)
+  {
+    super(JdwpConstants.Tag.BYTE);
+    _value = value;
+  }
+  
+  /**
+   * Get the value held in this Value
+   * 
+   * @return the value represented by this Value object
+   */
+  public byte getValue()
+  {
+    return _value;
+  }
+  
+  /**
+   * Return an object representing this type
+   * 
+   * @return an Object represntation of this value
+   */
+  @Override
+  protected Object getObject()
+  {
+    return new Byte(_value);
+  }
+
+  /**
+   * Write the wrapped byte to the given DataOutputStream.
+   * 
+   * @param os the output stream to write to
+   */
+  @Override
+  protected void write(DataOutputStream os)
+    throws IOException
+  {
+    os.writeByte(_value);
+  }
+}
diff --git a/libjava/classpath/gnu/classpath/jdwp/value/CharValue.java b/libjava/classpath/gnu/classpath/jdwp/value/CharValue.java
new file mode 100644 (file)
index 0000000..f68fc88
--- /dev/null
@@ -0,0 +1,100 @@
+/* CharValue.java -- JDWP wrapper class for a char value
+   Copyright (C) 2007 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.jdwp.value;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * Wrapper for an char value.
+ * 
+ * @author Kyle Galloway <kgallowa@redhat.com>
+ */
+public final class CharValue
+    extends Value
+{
+  // The char wrapped by this class
+  char _value;
+
+  /**
+   * Create a new CharValue from an char
+   * 
+   * @param value the char to wrap
+   */
+  public CharValue(char value)
+  {
+    super(JdwpConstants.Tag.CHAR);
+    _value = value;
+  }
+  
+  /**
+   * Get the value held in this Value
+   * 
+   * @return the value represented by this Value object
+   */
+  public char getValue()
+  {
+    return _value;
+  }
+  
+  /**
+   * Return an object representing this type
+   * 
+   * @return an Object represntation of this value
+   */
+  @Override
+  protected Object getObject()
+  {
+    return new Character(_value);
+  }
+
+  /**
+   * Write the wrapped char to the given DataOutputStream.
+   * 
+   * @param os the output stream to write to
+   */
+  @Override
+  protected void write(DataOutputStream os)
+    throws IOException
+  {
+    os.writeChar(_value);
+  }
+}
+
diff --git a/libjava/classpath/gnu/classpath/jdwp/value/DoubleValue.java b/libjava/classpath/gnu/classpath/jdwp/value/DoubleValue.java
new file mode 100644 (file)
index 0000000..45923c4
--- /dev/null
@@ -0,0 +1,100 @@
+/* DoubleValue.java -- JDWP wrapper class for a double value
+   Copyright (C) 2007 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.jdwp.value;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * Wrapper for an double value.
+ * 
+ * @author Kyle Galloway <kgallowa@redhat.com>
+ */
+public final class DoubleValue
+    extends Value
+{
+  // The double wrapped by this class
+  double _value;
+
+  /**
+   * Create a new DoubleValue from an double
+   * 
+   * @param value the double to wrap
+   */
+  public DoubleValue(double value)
+  {
+    super(JdwpConstants.Tag.DOUBLE);
+    _value = value;
+  }
+  
+  /**
+   * Get the value held in this Value
+   * 
+   * @return the value represented by this Value object
+   */
+  public double getValue()
+  {
+    return _value;
+  }
+  
+  /**
+   * Return an object representing this type
+   * 
+   * @return an Object represntation of this value
+   */
+  @Override
+  protected Object getObject()
+  {
+    return new Double(_value);
+  }
+
+  /**
+   * Write the wrapped double to the given DataOutputStream.
+   * 
+   * @param os the output stream to write to
+   */
+  @Override
+  protected void write(DataOutputStream os)
+    throws IOException
+  {
+    os.writeDouble(_value);
+  }
+}
+
diff --git a/libjava/classpath/gnu/classpath/jdwp/value/FloatValue.java b/libjava/classpath/gnu/classpath/jdwp/value/FloatValue.java
new file mode 100644 (file)
index 0000000..970f77c
--- /dev/null
@@ -0,0 +1,100 @@
+/* FloatValue.java -- JDWP wrapper class for a float value
+   Copyright (C) 2007 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+afloat with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.jdwp.value;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * Wrapper for an float value.
+ * 
+ * @author Kyle Galloway <kgallowa@redhat.com>
+ */
+public final class FloatValue
+    extends Value
+{
+  // The float wrapped by this class
+  float _value;
+
+  /**
+   * Create a new FloatValue from an float
+   * 
+   * @param value the float to wrap
+   */
+  public FloatValue(float value)
+  {
+    super(JdwpConstants.Tag.FLOAT);
+    _value = value;
+  }
+  
+  /**
+   * Get the value held in this Value
+   * 
+   * @return the value represented by this Value object
+   */
+  public float getValue()
+  {
+    return _value;
+  }
+  
+  /**
+   * Return an object representing this type
+   * 
+   * @return an Object represntation of this value
+   */
+  @Override
+  protected Object getObject()
+  {
+    return new Float(_value);
+  }
+
+  /**
+   * Write the wrapped float to the given DataOutputStream.
+   * 
+   * @param os the output stream to write to
+   */
+  @Override
+  protected void write(DataOutputStream os)
+    throws IOException
+  {
+    os.writeFloat(_value);
+  }
+}
+
diff --git a/libjava/classpath/gnu/classpath/jdwp/value/IntValue.java b/libjava/classpath/gnu/classpath/jdwp/value/IntValue.java
new file mode 100644 (file)
index 0000000..2786875
--- /dev/null
@@ -0,0 +1,100 @@
+/* IntValue.java -- JDWP wrapper class for an int value
+   Copyright (C) 2007 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.jdwp.value;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * Wrapper for an int value.
+ * 
+ * @author Kyle Galloway <kgallowa@redhat.com>
+ */
+public final class IntValue
+    extends Value
+{
+  // The int wrapped by this class
+  int _value;
+
+  /**
+   * Create a new IntValue from an int
+   * 
+   * @param value the int to wrap
+   */
+  public IntValue(int value)
+  {
+    super(JdwpConstants.Tag.INT);
+    _value = value;
+  }
+  
+  /**
+   * Get the value held in this Value
+   * 
+   * @return the value represented by this Value object
+   */
+  public int getValue()
+  {
+    return _value;
+  }
+  
+  /**
+   * Return an object representing this type
+   * 
+   * @return an Object represntation of this value
+   */
+  @Override
+  protected Object getObject()
+  {
+    return new Integer(_value);
+  }
+
+  /**
+   * Write the wrapped int to the given DataOutputStream.
+   * 
+   * @param os the output stream to write to
+   */
+  @Override
+  protected void write(DataOutputStream os)
+    throws IOException
+  {
+    os.writeInt(_value);
+  }
+}
+
diff --git a/libjava/classpath/gnu/classpath/jdwp/value/LongValue.java b/libjava/classpath/gnu/classpath/jdwp/value/LongValue.java
new file mode 100644 (file)
index 0000000..0ebe0e9
--- /dev/null
@@ -0,0 +1,100 @@
+/* LongValue.java -- JDWP wrapper class for a long value
+   Copyright (C) 2007 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.jdwp.value;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * Wrapper for an long value.
+ * 
+ * @author Kyle Galloway <kgallowa@redhat.com>
+ */
+public final class LongValue
+    extends Value
+{
+  // The long wrapped by this class
+  long _value;
+
+  /**
+   * Create a new LongValue from an long
+   * 
+   * @param value the long to wrap
+   */
+  public LongValue(long value)
+  {
+    super(JdwpConstants.Tag.LONG);
+    _value = value;
+  }
+  
+  /**
+   * Get the value held in this Value
+   * 
+   * @return the value represented by this Value object
+   */
+  public long getValue()
+  {
+    return _value;
+  }
+  
+  /**
+   * Return an object representing this type
+   * 
+   * @return an Object represntation of this value
+   */
+  @Override
+  protected Object getObject()
+  {
+    return new Long(_value);
+  }
+
+  /**
+   * Write the wrapped long to the given DataOutputStream.
+   * 
+   * @param os the output stream to write to
+   */
+  @Override
+  protected void write(DataOutputStream os)
+    throws IOException
+  {
+    os.writeLong(_value);
+  }
+}
+
diff --git a/libjava/classpath/gnu/classpath/jdwp/value/ObjectValue.java b/libjava/classpath/gnu/classpath/jdwp/value/ObjectValue.java
new file mode 100644 (file)
index 0000000..7ec9beb
--- /dev/null
@@ -0,0 +1,92 @@
+/* ObjectValue.java -- JDWP wrapper class for an Object value
+   Copyright (C) 2007 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.jdwp.value;
+
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.VMIdManager;
+import gnu.classpath.jdwp.id.ObjectId;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * Wrapper for an Object value.
+ * 
+ * @author Kyle Galloway <kgallowa@redhat.com>
+ */
+public final class ObjectValue
+    extends Value
+{
+  // The Object wrapped by this class
+  Object _value;
+
+  /**
+   * Create a new ObjectValue from an Object
+   * 
+   * @param value the Object to wrap
+   */
+  public ObjectValue(Object value)
+  {
+    super(JdwpConstants.Tag.OBJECT);
+    _value = value;
+  }
+  
+  /**
+   * Return an object representing this type
+   * 
+   * @return an Object represntation of this value
+   */
+  @Override
+  protected Object getObject()
+  {
+    return _value;
+  }
+
+  /**
+   * Write the wrapped object to the given DataOutputStream.
+   * 
+   * @param os the output stream to write to
+   */
+  @Override
+  protected void write(DataOutputStream os)
+    throws IOException
+  {
+    ObjectId oid = VMIdManager.getDefault().getObjectId(_value);
+    oid.write(os);
+  }
+}
diff --git a/libjava/classpath/gnu/classpath/jdwp/value/ShortValue.java b/libjava/classpath/gnu/classpath/jdwp/value/ShortValue.java
new file mode 100644 (file)
index 0000000..cbde226
--- /dev/null
@@ -0,0 +1,100 @@
+/* ShortValue.java -- JDWP wrapper class for a short value
+   Copyright (C) 2007 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.jdwp.value;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * Wrapper for an short value.
+ * 
+ * @author Kyle Galloway <kgallowa@redhat.com>
+ */
+public final class ShortValue
+    extends Value
+{
+  // The short wrapped by this class
+  short _value;
+
+  /**
+   * Create a new ShortValue from a short
+   * 
+   * @param value the short to wrap
+   */
+  public ShortValue(short value)
+  {
+    super(JdwpConstants.Tag.SHORT);
+    _value = value;
+  }
+  
+  /**
+   * Get the value held in this Value
+   * 
+   * @return the value represented by this Value object
+   */
+  public short getValue()
+  {
+    return _value;
+  }
+  
+  /**
+   * Return an object representing this type
+   * 
+   * @return an Object represntation of this value
+   */
+  @Override
+  protected Object getObject()
+  {
+    return new Short(_value);
+  }
+
+  /**
+   * Write the wrapped short to the given DataOutputStream.
+   * 
+   * @param os the output stream to write to
+   */
+  @Override
+  protected void write(DataOutputStream os)
+    throws IOException
+  {
+    os.writeShort(_value);
+  }
+}
+
diff --git a/libjava/classpath/gnu/classpath/jdwp/value/StringValue.java b/libjava/classpath/gnu/classpath/jdwp/value/StringValue.java
new file mode 100644 (file)
index 0000000..2371547
--- /dev/null
@@ -0,0 +1,100 @@
+/* StringValue.java -- JDWP wrapper class for an String value
+   Copyright (C) 2007 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.jdwp.value;
+
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.util.JdwpString;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * Wrapper for an String value.
+ * 
+ * @author Kyle Galloway <kgallowa@redhat.com>
+ */
+public final class StringValue
+    extends Value
+{
+  // The String wrapped by this class
+  String _value;
+
+  /**
+   * Create a new StringValue from an String
+   * 
+   * @param value the String to wrap
+   */
+  public StringValue(String value)
+  {
+    super(JdwpConstants.Tag.OBJECT);
+    _value = value;
+  }
+  
+  /**
+   * Get the value held in this Value
+   * 
+   * @return the value represented by this Value object
+   */
+  public String getValue()
+  {
+    return _value;
+  }
+  
+  /**
+   * Return an object representing this type
+   * 
+   * @return an Object represntation of this value
+   */
+  @Override
+  protected Object getObject()
+  {
+    return _value;
+  }
+
+  /**
+   * Write the wrapped object to the given DataOutputStream.
+   * 
+   * @param os the output stream to write to
+   */
+  @Override
+  protected void write(DataOutputStream os)
+    throws IOException
+  {
+    JdwpString.writeString(os, _value);
+  }
+}
diff --git a/libjava/classpath/gnu/classpath/jdwp/value/Value.java b/libjava/classpath/gnu/classpath/jdwp/value/Value.java
new file mode 100644 (file)
index 0000000..4ad8bec
--- /dev/null
@@ -0,0 +1,155 @@
+/* Value.java -- base class of JDWP values
+   Copyright (C) 2007 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.value;
+
+import gnu.classpath.jdwp.exception.InvalidClassException;
+import gnu.classpath.jdwp.exception.InvalidObjectException;
+import gnu.classpath.jdwp.exception.InvalidTagException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+/**
+ * Superclass for all JDWP Values.
+ * 
+ * @author Kyle Galloway <kgallowa@redhat.com>
+ */
+public abstract class Value
+{
+  // A Tag representing the type of this value
+  private byte _tag;
+  
+  /**
+   * Create a new value of type tag.
+   * 
+   * @param tag the type of the value
+   */ 
+  protected Value(byte tag)
+  {
+    _tag = tag;
+  }
+  
+  /**
+   * Get the tag for this Value
+   * 
+   * @return the byte tag of this Value
+   */
+  public byte getTag()
+  {
+    return _tag;
+  }
+  
+  /**
+   * Calls the dervied classes writeValue method to write its value to the 
+   * DataOutputStream.
+   * 
+   * @param os write the value here
+   * @throws IOException
+   */  
+  public void writeUntagged(DataOutputStream os)
+    throws IOException
+  {
+    write(os);
+  }
+  
+  /**
+   * Will write the given object as a tagged value to the DataOutputStream.
+   * 
+   * @param os write the value here
+   * @param obj the Object to write
+   * @throws IOException
+   */
+  public void writeTagged(DataOutputStream os)
+    throws IOException
+  {
+    os.write (_tag);
+    write(os);
+  }
+  
+  /**
+   * This method must write the value to the DataOutputStream in a manner
+   * appropriate for the type of the value.
+   * 
+   * @param os DataOutputStream to write to
+   * @throws IOException
+   */
+  protected abstract void write(DataOutputStream os)
+    throws IOException;
+  
+  /**
+   * Returns an object representing this type
+   * 
+   * @return an Object represntation of this value
+   */
+  protected abstract Object getObject();
+    
+  /**
+   * Get an untagged object from the ByteBuffer
+   * 
+   * @param bb the ByteBuffer to extract the value from
+   * @param type a Class representing the type
+   * @return an Object from the ByteBuffer of the type of the Class parameter
+   * @throws JdwpInternalErrorException
+   * @throws InvalidObjectException
+   */
+  public static Object getUntaggedObject(ByteBuffer bb, Class type)
+    throws JdwpInternalErrorException, InvalidObjectException, InvalidClassException
+  {
+    Value val = ValueFactory.createFromUntagged(bb, type);
+    return val.getObject();
+  }
+  
+  /**
+   * Get an untagged object from the ByteBuffer
+   * 
+   * @param bb the ByteBuffer to extract the value from
+   * @param tag a byte tag representing the type
+   * @return an Object from the ByteBuffer of the type of the Class parameter
+   * @throws JdwpInternalErrorException
+   * @throws InvalidObjectException
+   */
+  public static Object getTaggedObject(ByteBuffer bb)
+    throws JdwpInternalErrorException, InvalidObjectException, InvalidTagException
+  {
+    Value val = ValueFactory.createFromTagged(bb);
+    return val.getObject();
+  }
+}
diff --git a/libjava/classpath/gnu/classpath/jdwp/value/ValueFactory.java b/libjava/classpath/gnu/classpath/jdwp/value/ValueFactory.java
new file mode 100644 (file)
index 0000000..8f1a878
--- /dev/null
@@ -0,0 +1,247 @@
+/* ValueFactory.java -- factory to create JDWP Values
+   Copyright (C) 2007 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.jdwp.value;
+
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.VMIdManager;
+import gnu.classpath.jdwp.exception.InvalidClassException;
+import gnu.classpath.jdwp.exception.InvalidObjectException;
+import gnu.classpath.jdwp.exception.InvalidTagException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.id.ObjectId;
+import gnu.classpath.jdwp.util.JdwpString;
+
+import java.nio.ByteBuffer;
+
+/**
+ * A factory to create JDWP Values.
+ * 
+ * @author Kyle Galloway <kgallowa@redhat.com>
+ */
+public class ValueFactory
+{
+  /**
+   * Creates a new Value of appropriate type for the value in the ByteBuffer
+   * by reading the tag byte from the front of the buffer.
+   * 
+   * @param bb contains the Object
+   * @return A new Value of appropriate type
+   * @throws JdwpInternalErrorException
+   * @throws InvalidObjectException
+   */
+  public static Value createFromTagged(ByteBuffer bb)
+    throws JdwpInternalErrorException, InvalidObjectException, InvalidTagException
+  {
+    return create(bb, bb.get());
+  }
+  
+  /**
+   * Creates a new Value of appropriate type for the value in the ByteBuffer
+   * by checking the type of the Class passed in.
+   * 
+   * @param bb contains the Object
+   * @param type a Class representing the type of the value in the ByteBuffer
+   * @return A new Value of appropriate type
+   * @throws JdwpInternalErrorException
+   * @throws InvalidObjectException
+   */
+  public static Value createFromUntagged(ByteBuffer bb, Class type)
+  throws JdwpInternalErrorException, InvalidObjectException, InvalidClassException
+  {
+    byte tag = getTagForClass(type);
+    
+    try
+      {
+        return create(bb, tag);
+      }
+    catch (InvalidTagException ite)
+      {
+        throw new InvalidClassException(ite);
+      }
+  }
+  
+  /**
+   * Creates a new Value of appropriate type for the value in the ByteBuffer.
+   * 
+   * @param bb contains the Object
+   * @param tag a byte representing the type of the object
+   * @return A new Value of appropriate type
+   * @throws JdwpInternalErrorException
+   * @throws InvalidObjectException
+   */
+  private static Value create(ByteBuffer bb, byte tag)
+    throws JdwpInternalErrorException, InvalidObjectException, InvalidTagException
+  {
+    Value val = null;
+    switch(tag)
+    {
+      case JdwpConstants.Tag.BYTE:
+        val = new ByteValue(bb.get());
+        break;
+      case JdwpConstants.Tag.BOOLEAN:
+        val = new BooleanValue((bb.get() != 0));
+        break;
+      case JdwpConstants.Tag.CHAR:
+        val = new CharValue(bb.getChar());
+        break;
+      case JdwpConstants.Tag.SHORT:
+        val = new ShortValue(bb.getShort());
+        break;
+      case JdwpConstants.Tag.INT:
+        val = new IntValue(bb.getInt());
+        break;
+      case JdwpConstants.Tag.FLOAT:
+        val = new FloatValue(bb.getFloat());
+        break;
+      case JdwpConstants.Tag.LONG:
+        val = new LongValue(bb.getLong());
+        break;
+      case JdwpConstants.Tag.DOUBLE:
+        val = new DoubleValue(bb.getDouble());
+        break;
+      case JdwpConstants.Tag.VOID:
+        val = new VoidValue();
+        break;
+      case JdwpConstants.Tag.ARRAY:
+      case JdwpConstants.Tag.THREAD:
+      case JdwpConstants.Tag.OBJECT:
+      case JdwpConstants.Tag.THREAD_GROUP:
+      case JdwpConstants.Tag.CLASS_LOADER:
+      case JdwpConstants.Tag.CLASS_OBJECT:
+        ObjectId oid = VMIdManager.getDefault().readObjectId(bb);
+        val = new ObjectValue(oid.getObject());
+        break;
+      case JdwpConstants.Tag.STRING:
+        val = new StringValue(JdwpString.readString(bb));
+        break;
+      default:
+        throw new InvalidTagException(tag);
+    }
+    
+    return val;
+  }
+  
+  /**
+   * Creates a tag for the type of the class.
+   * 
+   * @param klass the type to get a tag for
+   * @return a byte tag representing the class
+   * @throws JdwpInternalErrorException
+   * @throws InvalidObjectException
+   */
+  private static byte getTagForClass(Class klass)
+    throws JdwpInternalErrorException
+  {
+    byte tag;
+    
+    if (klass.isPrimitive())
+      {
+        if (klass == byte.class)
+          tag = JdwpConstants.Tag.BYTE;
+        else if (klass == boolean.class)
+          tag = JdwpConstants.Tag.BOOLEAN;
+        else if (klass == char.class)
+          tag = JdwpConstants.Tag.CHAR;
+        else if (klass == short.class)
+          tag = JdwpConstants.Tag.SHORT;
+        else if (klass == int.class)
+          tag = JdwpConstants.Tag.INT;
+        else if (klass == float.class)
+          tag = JdwpConstants.Tag.FLOAT;
+        else if (klass == long.class)
+          tag = JdwpConstants.Tag.LONG;
+        else if (klass == double.class)
+          tag = JdwpConstants.Tag.DOUBLE;
+        else if (klass == void.class)
+          tag = JdwpConstants.Tag.VOID;
+        else
+          throw new JdwpInternalErrorException("Invalid primitive class");
+      }
+    else
+      {
+        tag = JdwpConstants.Tag.OBJECT;
+      }
+    
+    return tag;
+  }
+  
+  /**
+   * Create a value type for an Object of type determined by a Class.  This is
+   * a special case where a value needs to be created, but the value to create
+   * it for is already in an object, not in a buffer.
+   * 
+   * @param value the Object to convert to a Value
+   * @param type the Class type of the object
+   * @return a new Value representing this object
+   */
+  public static Value createFromObject(Object value, Class type)
+  {
+    Value val = null;
+    
+    if (type.isPrimitive())
+      {
+        if (type == byte.class)
+          val = new ByteValue(((Byte) value).byteValue());
+        else if (type == boolean.class)
+          val = new BooleanValue(((Boolean) value).booleanValue());
+        else if (type == char.class)
+          val = new CharValue(((Character) value).charValue());
+        else if (type == short.class)
+          val = new ShortValue(((Short) value).shortValue());
+        else if (type == int.class)
+          val = new IntValue(((Integer) value).intValue());
+        else if (type == float.class)
+          val = new FloatValue(((Float) value).floatValue());
+        else if (type == long.class)
+          val = new LongValue(((Long) value).longValue());
+        else if (type == double.class)
+          val = new DoubleValue(((Double) value).doubleValue());
+        else if (type == void.class)
+          val = new VoidValue();
+      }
+    else
+      {
+        if (type.isAssignableFrom(String.class))
+          val = new StringValue ((String) value);
+        else
+          val = new ObjectValue(value);
+      }
+    
+    return val;
+  }
+}
diff --git a/libjava/classpath/gnu/classpath/jdwp/value/VoidValue.java b/libjava/classpath/gnu/classpath/jdwp/value/VoidValue.java
new file mode 100644 (file)
index 0000000..82cded9
--- /dev/null
@@ -0,0 +1,82 @@
+/* VoidValue.java -- JDWP wrapper class for a void value
+   Copyright (C) 2007 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.jdwp.value;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * Wrapper for an void value.
+ * 
+ * @author Kyle Galloway <kgallowa@redhat.com>
+ */
+public class VoidValue
+    extends Value
+{
+  /**
+   * Create a new VoidValue.
+   */
+  public VoidValue ()
+  {
+    super(JdwpConstants.Tag.VOID);
+  }
+  
+  /**
+   * Return an object representing this type
+   * 
+   * @return an Object represntation of this value
+   */
+  @Override
+  protected Object getObject()
+  {
+    return null;
+  }
+
+  /**
+   * Write the wrapped void to the given DataOutputStream.
+   * 
+   * @param os the output stream to write to
+   */
+  @Override
+  protected void write(DataOutputStream os) 
+    throws IOException
+  {
+  }
+}
index 10e284132fa3b6b6b9c5ddc84f8425b1eef20978..cf8f695204e4f85c4c2ba339fdff0dc28614b1b0 100644 (file)
Binary files a/libjava/classpath/lib/gnu/classpath/jdwp/VMFrame.class and b/libjava/classpath/lib/gnu/classpath/jdwp/VMFrame.class differ
index f48b6eb890ad060e4b41d8b0cbef1ab7dafd0ad8..09c69bf4234e0e26c6eb555fd04f188eeaff27e1 100644 (file)
Binary files a/libjava/classpath/lib/gnu/classpath/jdwp/VMVirtualMachine.class and b/libjava/classpath/lib/gnu/classpath/jdwp/VMVirtualMachine.class differ
index 49fd7f90d9f961a7593416a043689c8057a99cca..4d311632060b0bd5e3d1fe0f621ce5e646846ef7 100644 (file)
Binary files a/libjava/classpath/lib/gnu/classpath/jdwp/event/EventManager.class and b/libjava/classpath/lib/gnu/classpath/jdwp/event/EventManager.class differ
index ce6d2fbaca9bef7363ada7c16a773f6e21c25d9b..00c99201a97b02223610e45d3c8eb30003d890a6 100644 (file)
Binary files a/libjava/classpath/lib/gnu/classpath/jdwp/event/filters/StepFilter.class and b/libjava/classpath/lib/gnu/classpath/jdwp/event/filters/StepFilter.class differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/exception/InvalidSlotException.class b/libjava/classpath/lib/gnu/classpath/jdwp/exception/InvalidSlotException.class
new file mode 100644 (file)
index 0000000..36b8d35
Binary files /dev/null and b/libjava/classpath/lib/gnu/classpath/jdwp/exception/InvalidSlotException.class differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/exception/InvalidTagException.class b/libjava/classpath/lib/gnu/classpath/jdwp/exception/InvalidTagException.class
new file mode 100644 (file)
index 0000000..43a8518
Binary files /dev/null and b/libjava/classpath/lib/gnu/classpath/jdwp/exception/InvalidTagException.class differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/exception/TypeMismatchException.class b/libjava/classpath/lib/gnu/classpath/jdwp/exception/TypeMismatchException.class
new file mode 100644 (file)
index 0000000..97b0195
Binary files /dev/null and b/libjava/classpath/lib/gnu/classpath/jdwp/exception/TypeMismatchException.class differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/id/NullObjectId.class b/libjava/classpath/lib/gnu/classpath/jdwp/id/NullObjectId.class
new file mode 100644 (file)
index 0000000..dc57196
Binary files /dev/null and b/libjava/classpath/lib/gnu/classpath/jdwp/id/NullObjectId.class differ
index 7f0f3a4dade31e715c272f5831029ff2ba2ad2aa..755e2996ca385aa0f926964cba4a446a9f0eeefe 100644 (file)
Binary files a/libjava/classpath/lib/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.class and b/libjava/classpath/lib/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.class differ
index 18757d3f273b9e5ec7bc3ac6d83711aeb796b39e..962c347734be20ac18de3652318638fb47414a21 100644 (file)
Binary files a/libjava/classpath/lib/gnu/classpath/jdwp/processor/ClassTypeCommandSet.class and b/libjava/classpath/lib/gnu/classpath/jdwp/processor/ClassTypeCommandSet.class differ
index e1f284cd54dcdfb673fb6865f98b67df33a9c360..bbe0714c0206be2096f20ecf8a519593abc17322 100644 (file)
Binary files a/libjava/classpath/lib/gnu/classpath/jdwp/processor/EventRequestCommandSet.class and b/libjava/classpath/lib/gnu/classpath/jdwp/processor/EventRequestCommandSet.class differ
index bc2b3e71917fc3bf86fc837b85d0649ab514fa09..ebd5234ccbd4a7e6926fec613b3857cdd9bcda05 100644 (file)
Binary files a/libjava/classpath/lib/gnu/classpath/jdwp/processor/MethodCommandSet.class and b/libjava/classpath/lib/gnu/classpath/jdwp/processor/MethodCommandSet.class differ
index 3efdacfe6b1735580ce8ab825ac81a78701546be..8004557e409925938c09e4abf9785b9829f403cc 100644 (file)
Binary files a/libjava/classpath/lib/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.class and b/libjava/classpath/lib/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.class differ
index 1eedfc1dbe1afa849dfc61dbcbc99ab879505dcb..25ff1a94d72f7affaa854767061b3bd92acc1433 100644 (file)
Binary files a/libjava/classpath/lib/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.class and b/libjava/classpath/lib/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.class differ
index 5b8fa18bafab2b36dac8ac5497234c5a472ba2fc..d47a51d77ed54c6b5c1bf074e6ec140846459df0 100644 (file)
Binary files a/libjava/classpath/lib/gnu/classpath/jdwp/processor/StackFrameCommandSet.class and b/libjava/classpath/lib/gnu/classpath/jdwp/processor/StackFrameCommandSet.class differ
index 7aea1a69560becf375c79822d617fdd897f5c920..0398ff087778326a6c58c3724b4e1635a604a754 100644 (file)
Binary files a/libjava/classpath/lib/gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.class and b/libjava/classpath/lib/gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.class differ
index d92898641f88dbe26de459331951c64ac364faad..eadc685a0b5018de08bcbea1e2f784f662549c5f 100644 (file)
Binary files a/libjava/classpath/lib/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.class and b/libjava/classpath/lib/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.class differ
index 71f7f1f3781c51cb3dd881e08335bc0272e87a99..1e077c6a48cbe4223de597b92394e12c3afc506b 100644 (file)
Binary files a/libjava/classpath/lib/gnu/classpath/jdwp/util/MethodResult.class and b/libjava/classpath/lib/gnu/classpath/jdwp/util/MethodResult.class differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/util/MonitorInfo.class b/libjava/classpath/lib/gnu/classpath/jdwp/util/MonitorInfo.class
new file mode 100644 (file)
index 0000000..e0cf74f
Binary files /dev/null and b/libjava/classpath/lib/gnu/classpath/jdwp/util/MonitorInfo.class differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/util/NullObject.class b/libjava/classpath/lib/gnu/classpath/jdwp/util/NullObject.class
new file mode 100644 (file)
index 0000000..5e093e1
Binary files /dev/null and b/libjava/classpath/lib/gnu/classpath/jdwp/util/NullObject.class differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/value/BooleanValue.class b/libjava/classpath/lib/gnu/classpath/jdwp/value/BooleanValue.class
new file mode 100644 (file)
index 0000000..07a2349
Binary files /dev/null and b/libjava/classpath/lib/gnu/classpath/jdwp/value/BooleanValue.class differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/value/ByteValue.class b/libjava/classpath/lib/gnu/classpath/jdwp/value/ByteValue.class
new file mode 100644 (file)
index 0000000..efa7108
Binary files /dev/null and b/libjava/classpath/lib/gnu/classpath/jdwp/value/ByteValue.class differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/value/CharValue.class b/libjava/classpath/lib/gnu/classpath/jdwp/value/CharValue.class
new file mode 100644 (file)
index 0000000..747967a
Binary files /dev/null and b/libjava/classpath/lib/gnu/classpath/jdwp/value/CharValue.class differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/value/DoubleValue.class b/libjava/classpath/lib/gnu/classpath/jdwp/value/DoubleValue.class
new file mode 100644 (file)
index 0000000..cd3446f
Binary files /dev/null and b/libjava/classpath/lib/gnu/classpath/jdwp/value/DoubleValue.class differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/value/FloatValue.class b/libjava/classpath/lib/gnu/classpath/jdwp/value/FloatValue.class
new file mode 100644 (file)
index 0000000..8db3be6
Binary files /dev/null and b/libjava/classpath/lib/gnu/classpath/jdwp/value/FloatValue.class differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/value/IntValue.class b/libjava/classpath/lib/gnu/classpath/jdwp/value/IntValue.class
new file mode 100644 (file)
index 0000000..44314bc
Binary files /dev/null and b/libjava/classpath/lib/gnu/classpath/jdwp/value/IntValue.class differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/value/LongValue.class b/libjava/classpath/lib/gnu/classpath/jdwp/value/LongValue.class
new file mode 100644 (file)
index 0000000..ed3f15c
Binary files /dev/null and b/libjava/classpath/lib/gnu/classpath/jdwp/value/LongValue.class differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/value/ObjectValue.class b/libjava/classpath/lib/gnu/classpath/jdwp/value/ObjectValue.class
new file mode 100644 (file)
index 0000000..09f765c
Binary files /dev/null and b/libjava/classpath/lib/gnu/classpath/jdwp/value/ObjectValue.class differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/value/ShortValue.class b/libjava/classpath/lib/gnu/classpath/jdwp/value/ShortValue.class
new file mode 100644 (file)
index 0000000..c4c9584
Binary files /dev/null and b/libjava/classpath/lib/gnu/classpath/jdwp/value/ShortValue.class differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/value/StringValue.class b/libjava/classpath/lib/gnu/classpath/jdwp/value/StringValue.class
new file mode 100644 (file)
index 0000000..32526db
Binary files /dev/null and b/libjava/classpath/lib/gnu/classpath/jdwp/value/StringValue.class differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/value/Value.class b/libjava/classpath/lib/gnu/classpath/jdwp/value/Value.class
new file mode 100644 (file)
index 0000000..c23ace6
Binary files /dev/null and b/libjava/classpath/lib/gnu/classpath/jdwp/value/Value.class differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/value/ValueFactory.class b/libjava/classpath/lib/gnu/classpath/jdwp/value/ValueFactory.class
new file mode 100644 (file)
index 0000000..375ad80
Binary files /dev/null and b/libjava/classpath/lib/gnu/classpath/jdwp/value/ValueFactory.class differ
diff --git a/libjava/classpath/lib/gnu/classpath/jdwp/value/VoidValue.class b/libjava/classpath/lib/gnu/classpath/jdwp/value/VoidValue.class
new file mode 100644 (file)
index 0000000..123fb9e
Binary files /dev/null and b/libjava/classpath/lib/gnu/classpath/jdwp/value/VoidValue.class differ