summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2006-02-16 22:06:48 +0000
committerKeith Seitz <keiths@redhat.com>2006-02-16 22:06:48 +0000
commitffc5fc13f8b87ad8afe75ef8c3d03a1e715b8cac (patch)
tree0d62d519d2fd30c4522d7925f67da13a837a874a
parentd5407817fd6747a8f1f9bf4195060ca5be4e5365 (diff)
downloadclasspath-ffc5fc13f8b87ad8afe75ef8c3d03a1e715b8cac.tar.gz
* gnu/classpath/jdwp/id/JdwpId.java (size): Make static. Return
default size of eight bytes. * gnu/classpath/jdwp/id/ObjectId.java (size): Remove. * gnu/classpath/jdwp/id/ReferenceTypeId.java (size): Remove. * gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java (executeIDsizes): Use new static methods. * vm/reference/gnu/classpath/jdwp/VMFrame.java (size): New static method.
-rw-r--r--ChangeLog11
-rw-r--r--gnu/classpath/jdwp/id/JdwpId.java10
-rw-r--r--gnu/classpath/jdwp/id/ObjectId.java10
-rw-r--r--gnu/classpath/jdwp/id/ReferenceTypeId.java10
-rw-r--r--gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java16
-rw-r--r--vm/reference/gnu/classpath/jdwp/VMFrame.java10
6 files changed, 38 insertions, 29 deletions
diff --git a/ChangeLog b/ChangeLog
index 3b0f7c946..1f6c98d09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2006-02-16 Keith Seitz <keiths@redhat.com>
+
+ * gnu/classpath/jdwp/id/JdwpId.java (size): Make static. Return
+ default size of eight bytes.
+ * gnu/classpath/jdwp/id/ObjectId.java (size): Remove.
+ * gnu/classpath/jdwp/id/ReferenceTypeId.java (size): Remove.
+ * gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
+ (executeIDsizes): Use new static methods.
+ * vm/reference/gnu/classpath/jdwp/VMFrame.java (size): New static
+ method.
+
2006-02-16 David Daney <ddaney@avtrex.com>
PR classpath/26312
diff --git a/gnu/classpath/jdwp/id/JdwpId.java b/gnu/classpath/jdwp/id/JdwpId.java
index 7f610e353..6e1688bd0 100644
--- a/gnu/classpath/jdwp/id/JdwpId.java
+++ b/gnu/classpath/jdwp/id/JdwpId.java
@@ -1,5 +1,5 @@
/* JdwpId.java -- base class for all object ID types
- Copyright (C) 2005 Free Software Foundation
+ Copyright (C) 2005, 2006 Free Software Foundation
This file is part of GNU Classpath.
@@ -122,9 +122,13 @@ public abstract class JdwpId
}
/**
- * Returns size of this type (used by IDSizes)
+ * Returns size of this type (used by IDSizes). Default sizes
+ * for all IDs are 8 bytes (long).
*/
- public abstract int size ();
+ public static int size ()
+ {
+ return 8;
+ }
/**
* Writes the contents of this type to the <code>DataOutputStream</code>
diff --git a/gnu/classpath/jdwp/id/ObjectId.java b/gnu/classpath/jdwp/id/ObjectId.java
index 3e2abd4f6..a4a37fd13 100644
--- a/gnu/classpath/jdwp/id/ObjectId.java
+++ b/gnu/classpath/jdwp/id/ObjectId.java
@@ -1,5 +1,5 @@
/* ObjectId.java -- object IDs
- Copyright (C) 2005 Free Software Foundation
+ Copyright (C) 2005, 2006 Free Software Foundation
This file is part of GNU Classpath.
@@ -83,14 +83,6 @@ public class ObjectId
}
/**
- * Returns the size of this id type
- */
- public int size ()
- {
- return 8;
- }
-
- /**
* Returns the object referred to by this ID
*
* @returns the object
diff --git a/gnu/classpath/jdwp/id/ReferenceTypeId.java b/gnu/classpath/jdwp/id/ReferenceTypeId.java
index e7a5d2c3d..b82acf34a 100644
--- a/gnu/classpath/jdwp/id/ReferenceTypeId.java
+++ b/gnu/classpath/jdwp/id/ReferenceTypeId.java
@@ -1,5 +1,5 @@
/* ReferenceTypeId.java -- a base class for all reference type IDs
- Copyright (C) 2005 Free Software Foundation
+ Copyright (C) 2005, 2006 Free Software Foundation
This file is part of GNU Classpath.
@@ -62,14 +62,6 @@ public class ReferenceTypeId
}
/**
- * Returns the size of this ID type
- */
- public int size ()
- {
- return 8;
- }
-
- /**
* Gets the class associated with this ID
*
* @returns the class
diff --git a/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java b/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
index 6bdb23681..d878066ff 100644
--- a/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
+++ b/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
@@ -1,6 +1,6 @@
/* VirtualMachineCommandSet.java -- class to implement the VirtualMachine
Command Set
- Copyright (C) 2005 Free Software Foundation
+ Copyright (C) 2005, 2006 Free Software Foundation
This file is part of GNU Classpath.
@@ -40,6 +40,9 @@ exception statement from your version. */
package gnu.classpath.jdwp.processor;
import gnu.classpath.jdwp.JdwpConstants;
+//import gnu.classpath.jdwp.VMField;
+import gnu.classpath.jdwp.VMFrame;
+//import gnu.classpath.jdwp.VMMethod;
import gnu.classpath.jdwp.VMVirtualMachine;
import gnu.classpath.jdwp.exception.JdwpException;
import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
@@ -298,12 +301,11 @@ public class VirtualMachineCommandSet
private void executeIDsizes(ByteBuffer bb, DataOutputStream os)
throws JdwpException, IOException
{
- ObjectId oid = new ObjectId();
- os.writeInt(oid.size()); // fieldId
- os.writeInt(oid.size()); // methodId
- os.writeInt(oid.size()); // objectId
- os.writeInt(new ReferenceTypeId((byte) 0x00).size()); // referenceTypeId
- os.writeInt(oid.size()); // frameId
+ os.writeInt(ObjectId.size ()); // fieldId FIXME
+ os.writeInt(ObjectId.size ()); // methodId FIXME
+ os.writeInt(ObjectId.size ()); // objectId
+ os.writeInt(ReferenceTypeId.size ()); // referenceTypeId
+ os.writeInt(VMFrame.size ()); // frameId
}
private void executeSuspend(ByteBuffer bb, DataOutputStream os)
diff --git a/vm/reference/gnu/classpath/jdwp/VMFrame.java b/vm/reference/gnu/classpath/jdwp/VMFrame.java
index 4d3b01074..fff6f1533 100644
--- a/vm/reference/gnu/classpath/jdwp/VMFrame.java
+++ b/vm/reference/gnu/classpath/jdwp/VMFrame.java
@@ -1,5 +1,5 @@
/* VMFrame.java -- Reference implementation of VM hooks for JDWP Frame access.
- Copyright (C) 2005 Free Software Foundation
+ Copyright (C) 2005, 2006 Free Software Foundation
This file is part of GNU Classpath.
@@ -49,6 +49,14 @@ import gnu.classpath.jdwp.util.Location;
public class VMFrame
{
+ /**
+ * Returns the size of a frame ID over JDWP
+ */
+ public static int size ()
+ {
+ return 8;
+ }
+
// The object this frame resides in
private Object obj;