diff options
author | Zoltan Varga <vargaz@gmail.com> | 2010-03-02 01:24:26 +0300 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2010-03-02 01:24:26 +0300 |
commit | 1e528e0c8f6d75adbcea8b94e0f0f6a88e0e3fa4 (patch) | |
tree | 91736593d158acec403c4912845778966bfd36cf /mcs | |
parent | f9791c6d66b130aad56b702a693be0a2955046d4 (diff) |
2010-03-01 Zoltan Varga <vargaz@gmail.com>
* Connection.cs: Send the protocol version used by the client to the debuggee
after the handshake.
svn path=/branches/mono-2-6/mcs/; revision=152756
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs | 25 |
2 files changed, 29 insertions, 1 deletions
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ChangeLog b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ChangeLog index 6c75b7183a8..aa2cf8229f5 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ChangeLog +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ChangeLog @@ -1,5 +1,10 @@ 2010-03-01 Zoltan Varga <vargaz@gmail.com> + * Connection.cs: Send the protocol version used by the client to the debuggee + after the handshake. + +2010-03-01 Zoltan Varga <vargaz@gmail.com> + * Location.cs: Implement ToString (). * AppDomainMirror.cs (CreateBoxedValue): New method to create a boxed value from diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs index 21d7067e347..14936f372db 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs @@ -286,7 +286,8 @@ namespace Mono.Debugger.Soft RESUME = 4, EXIT = 5, DISPOSE = 6, - INVOKE_METHOD = 7 + INVOKE_METHOD = 7, + SET_PROTOCOL_VERSION = 8 } enum CmdEvent { @@ -849,6 +850,24 @@ namespace Mono.Debugger.Soft receiver_thread.Start (); Version = VM_GetVersion (); + + // + // Tell the debuggee our protocol version, so newer debuggees can work + // with older clients + // + + // + // Older debuggees might not support this request + EventHandler<ErrorHandlerEventArgs> OrigErrorHandler = ErrorHandler; + ErrorHandler = null; + ErrorHandler += delegate (object sender, ErrorHandlerEventArgs args) { + throw new NotSupportedException (); + }; + try { + VM_SetProtocolVersion (MAJOR_VERSION, MINOR_VERSION); + } catch (NotSupportedException) { + } + ErrorHandler = OrigErrorHandler; } public EndPoint EndPoint { @@ -1155,6 +1174,10 @@ namespace Mono.Debugger.Soft return info; } + public void VM_SetProtocolVersion (int major, int minor) { + SendReceive (CommandSet.VM, (int)CmdVM.SET_PROTOCOL_VERSION, new PacketWriter ().WriteInt (major).WriteInt (minor)); + } + public long[] VM_GetThreads () { var res = SendReceive (CommandSet.VM, (int)CmdVM.ALL_THREADS, null); int len = res.ReadInt (); |