/// <summary>
 /// Write the modifier to the writer of a packet.
 /// In this method the kind byte is written override to write additional data.
 /// </summary>
 internal override void WriteTo(JdwpPacket.DataReaderWriter writer)
 {
     base.WriteTo(writer);
     threadId.WriteTo(writer);
     writer.SetInt((int)stepSize);
     writer.SetInt((int)stepDepth);
 }
Exemple #2
0
        /// <summary>
        /// Write this ID into the given packet writer.
        /// </summary>
        public void WriteTo(JdwpPacket.DataReaderWriter readerWriter)
        {
            switch (idSize)
            {
            case 4:
                readerWriter.SetInt((int)id);
                break;

            case 8:
                readerWriter.SetLong(id);
                break;

            default:
                throw new ArgumentException("Unsupported ID size " + idSize);
            }
        }
Exemple #3
0
        /// <summary>
        /// Read an untagged value.
        /// </summary>
        private static void WriteValue(JdwpPacket.DataReaderWriter data, Jdwp.Tag tag, object obj)
        {
            switch (tag)
            {
            //case Jdwp.Tag.Array:
            //case Jdwp.Tag.Object:
            //case Jdwp.Tag.String:
            //case Jdwp.Tag.Thread:
            //case Jdwp.Tag.ThreadGroup:
            //case Jdwp.Tag.ClassLoader:
            //case Jdwp.Tag.ClassObject:
            //    return new ObjectId(readerWriter);
            case Jdwp.Tag.Byte:
                data.SetByte((byte)obj);
                break;

            case Jdwp.Tag.Short:
            case Jdwp.Tag.Char:
                data.SetInt16((int)obj);
                break;

            //case Jdwp.Tag.Float:
            //    readerWriter.GetFloat(); //?
            //    break;
            //case Jdwp.Tag.Double:
            //    return readerWriter.SetDouble(); //?
            case Jdwp.Tag.Int:
                data.SetInt((int)obj);
                break;

            case Jdwp.Tag.Long:
                data.SetLong((long)obj);
                break;

            case Jdwp.Tag.Boolean:
                data.SetBoolean((bool)obj);
                break;

            default:
                throw new ArgumentException("unsupported tag " + tag);
            }
        }
Exemple #4
0
 /// <summary>
 /// writes slot and value.
 /// </summary>
 /// <param name="data"></param>
 public void Write(JdwpPacket.DataReaderWriter data)
 {
     data.SetInt(Slot);
     WriteValue(data);
 }
 /// <summary>
 /// Write the modifier to the writer of a packet.
 /// In this method the kind byte is written override to write additional data.
 /// </summary>
 internal override void WriteTo(JdwpPacket.DataReaderWriter writer)
 {
     base.WriteTo(writer);
     writer.SetInt(count);
 }