|
Message
From: cvs at opencores.org<cvs@o...>
Date: Fri Jan 18 19:30:06 CET 2008
Subject: [cvs-checkins] MODIFIED: jop ...
Date: 00/08/01 18:19:30 Modified: jop/java/target/src/test/debug/io DebugKernelChannel.java Log: Added methods to send JDWP reply packets for the "get instance field" command. Changed the way the streams are initialized on the constructor. Fixed one typo. Modified constructor: 75: public DebugKernelChannel(InputStream input, OutputStream output) Methods added: 609: public void prepareInstanceValuesPacket(int count) throws IOException 623: public synchronized void writeInstanceFieldValue(int fieldValue) 633: public synchronized void sendInstanceFieldValuesReply() throws IOException Revision Changes Path 1.5 jop/java/target/src/test/debug/io/DebugKernelChannel.java http://www.opencores.org/cvsweb.shtml/jop/java/target/src/test/debug/io/DebugKernelChannel.java.diff?r1=1.4&r2=1.5 (In the diff below, changes in quantity of whitespace are not shown.) Index: DebugKernelChannel.java =================================================================== RCS file: /cvsroot/paulo/jop/java/target/src/test/debug/io/DebugKernelChannel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- DebugKernelChannel.java 19 Dec 2007 02:53:36 -0000 1.4 +++ DebugKernelChannel.java 18 Jan 2008 18:30:05 -0000 1.5 @@ -80,7 +80,15 @@ throw new NullPointerException("Debug channel not initialized: Null stream(s)!"); } + if(input instanceof DataInputStream) + { + inputStream = (DataInputStream) input; + } + else + { inputStream = new DataInputStream(input); + } + outputStream = output; inputPacket = new JavaDebugPacket(); @@ -583,7 +591,7 @@ } /** - * Send the packet with data about stack frmaes to the server. + * Send the packet with data about stack frames to the server. * * @throws IOException */ @@ -591,4 +599,39 @@ { sendPacket(); } + + /** + * Prepare the reply for the "get instance values" command. + * + * @param count + * @throws IOException + */ + public void prepareInstanceValuesPacket(int count) throws IOException + { + // create a reply packet based on the received packet. + createEmptyReplyPacket(); + + // write the number of instance field values. + outputPacket.writeInt(count); + } + + /** + * Write information related to one instance field on the output packet. + * + * @param framePointer + */ + public synchronized void writeInstanceFieldValue(int fieldValue) + { + outputPacket.writeInt(fieldValue); + } + + /** + * Send the packet with data about instance field values to the server. + * + * @throws IOException
+ */
+ public synchronized void sendInstanceFieldValuesReply() throws IOException
+ {
+ sendPacket();
+ }
}
\ No newline at end of file
|
 |