Revert "Merge branch 'master' of https://github.com/mono/mono"
[mono.git] / mcs / class / Mono.Debugger.Soft / Mono.Debugger.Soft / Connection.cs
index 13096f05947b418888735d9ae55edce527da6103..7b69efb22b8ff5e5564f87e1932dad310f1903ee 100644 (file)
@@ -214,6 +214,12 @@ namespace Mono.Debugger.Soft
                public long Assembly;
        }               
 
+       class FieldMirrorInfo {
+               public string Name;
+               public long Parent, TypeId;
+               public int Attrs;
+       }
+
        enum TokenType {
                STRING = 0,
                TYPE = 1,
@@ -405,7 +411,7 @@ namespace Mono.Debugger.Soft
                 * with newer runtimes, and vice versa.
                 */
                internal const int MAJOR_VERSION = 2;
-               internal const int MINOR_VERSION = 27;
+               internal const int MINOR_VERSION = 29;
 
                enum WPSuspendPolicy {
                        NONE = 0,
@@ -426,6 +432,7 @@ namespace Mono.Debugger.Soft
                        METHOD = 22,
                        TYPE = 23,
                        MODULE = 24,
+                       FIELD = 25,
                        EVENT = 64
                }
 
@@ -488,7 +495,8 @@ namespace Mono.Debugger.Soft
                        /* FIXME: Merge into GET_INFO when the major protocol version is increased */
                        GET_ID = 5,
                        /* Ditto */
-                       GET_TID = 6
+                       GET_TID = 6,
+                       SET_IP = 7
                }
 
                enum CmdEventRequest {
@@ -556,6 +564,10 @@ namespace Mono.Debugger.Soft
                        IS_INITIALIZED = 18
                }
 
+               enum CmdField {
+                       GET_INFO = 1
+               }
+
                [Flags]
                enum BindingFlagsExtensions {
                        BINDING_FLAGS_IGNORE_CASE = 0x70000000,
@@ -1357,6 +1369,9 @@ namespace Mono.Debugger.Soft
                        case CommandSet.MODULE:
                                cmd = ((CmdModule)command).ToString ();
                                break;
+                       case CommandSet.FIELD:
+                               cmd = ((CmdField)command).ToString ();
+                               break;
                        case CommandSet.EVENT:
                                cmd = ((CmdEvent)command).ToString ();
                                break;
@@ -1926,6 +1941,10 @@ namespace Mono.Debugger.Soft
                        return SendReceive (CommandSet.THREAD, (int)CmdThread.GET_TID, new PacketWriter ().WriteId (id)).ReadLong ();
                }
 
+               internal void Thread_SetIP (long id, long method_id, long il_offset) {
+                       SendReceive (CommandSet.THREAD, (int)CmdThread.SET_IP, new PacketWriter ().WriteId (id).WriteId (method_id).WriteLong (il_offset));
+               }
+
                /*
                 * MODULE
                 */
@@ -2135,6 +2154,16 @@ namespace Mono.Debugger.Soft
                        return r.ReadInt () == 1;
                }
 
+               /*
+                * FIELD
+                */
+
+               internal FieldMirrorInfo Field_GetInfo (long id) {
+                       PacketReader r = SendReceive (CommandSet.FIELD, (int)CmdField.GET_INFO, new PacketWriter ().WriteId (id));
+                       FieldMirrorInfo info = new FieldMirrorInfo { Name = r.ReadString (), Parent = r.ReadId (), TypeId = r.ReadId (), Attrs = r.ReadInt () };
+                       return info;
+               }
+
                /*
                 * EVENTS
                 */