Exemple #1
0
 /// <summary>
 /// Write this location into the given packet writer.
 /// </summary>
 public void WriteTo(JdwpPacket.DataReaderWriter writer)
 {
     writer.SetByte((byte)GetType(Class));
     Class.WriteTo(writer);
     Method.WriteTo(writer);
     writer.SetULong(Index);
 }
Exemple #2
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 #3
0
 /// <summary>
 /// Write this location into the given packet writer.
 /// </summary>
 public void WriteTo(JdwpPacket.DataReaderWriter writer)
 {
     writer.SetByte((byte)Tag);
     Object.WriteTo(writer);
 }
Exemple #4
0
 /// <summary>
 /// writes only the value, without the slot.
 /// </summary>
 /// <param name="data"></param>
 public void WriteValue(JdwpPacket.DataReaderWriter data)
 {
     data.SetByte((byte)Tag);
     WriteValue(data, Tag, Value);
 }
 /// <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 virtual void WriteTo(JdwpPacket.DataReaderWriter writer)
 {
     writer.SetByte((byte)kind);
 }