This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[RFA/JDWP] Fix VariableTable
- From: Kyle Galloway <kgallowa at redhat dot com>
- To: GCJ-patches <java-patches at gcc dot gnu dot org>
- Date: Tue, 03 Apr 2007 15:10:35 -0400
- Subject: [RFA/JDWP] Fix VariableTable
This fix, now in classpath, fixes jdwp/util/VariableTable. Previously,
two variables were longs, where the spec says they should be ints. This
causes the variable table data to be corrupted when it is sent to the
debugger.
ChangeLog
2007-04-03 Kyle Galloway <kgallowa@redhat.com>
* classpath/gnu/classpath/jdwp/util/VariableTable.java: Change longs
to ints for argCnt and slots.
(write): Replace writeLong with writeInt for the above.
Questions/comments/concerns?
Thanks,
Kyle
Index: /notnfs/kgallowa/work/gcc/libjava/classpath/gnu/classpath/jdwp/util/VariableTable.java
===================================================================
--- /notnfs/kgallowa/work/gcc/libjava/classpath/gnu/classpath/jdwp/util/VariableTable.java (revision 123426)
+++ /notnfs/kgallowa/work/gcc/libjava/classpath/gnu/classpath/jdwp/util/VariableTable.java (working copy)
@@ -50,9 +50,9 @@
public class VariableTable
{
- private final long argCnt;
+ private final int argCnt;
- private final long slots;
+ private final int slots;
private final long[] lineCI;
@@ -95,8 +95,8 @@
*/
public void write(DataOutputStream os) throws IOException
{
- os.writeLong(argCnt);
- os.writeLong(slots);
+ os.writeInt(argCnt);
+ os.writeInt(slots);
for (int i = 0; i < slots; i++)
{
os.writeLong(lineCI[i]);