Imported Upstream version 4.8.0.489

Former-commit-id: 711682279101ddc89ff7b3b8639a574568fd6a0f
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-02-15 10:05:45 +00:00
parent f38a7b4f5b
commit 702a3ab1af
41 changed files with 68 additions and 94 deletions

View File

@@ -14,6 +14,7 @@ namespace Mono.Debugger.Soft
ModuleMirror main_module;
AssemblyName aname;
AssemblyDefinition meta;
AppDomainMirror domain;
Dictionary<string, long> typeCacheIgnoreCase = new Dictionary<string, long> (StringComparer.InvariantCultureIgnoreCase);
Dictionary<string, long> typeCache = new Dictionary<string, long> ();
@@ -50,6 +51,17 @@ namespace Mono.Debugger.Soft
}
}
// Since Protocol version 2.45
public AppDomainMirror Domain {
get {
if (domain == null) {
vm.CheckProtocolVersion (2, 45);
domain = vm.GetDomain (vm.conn.Assembly_GetIdDomain (id));
}
return domain;
}
}
public virtual AssemblyName GetName () {
if (aname == null) {
string name = vm.conn.Assembly_GetName (id);

View File

@@ -420,7 +420,7 @@ namespace Mono.Debugger.Soft
* with newer runtimes, and vice versa.
*/
internal const int MAJOR_VERSION = 2;
internal const int MINOR_VERSION = 43;
internal const int MINOR_VERSION = 45;
enum WPSuspendPolicy {
NONE = 0,
@@ -532,7 +532,8 @@ namespace Mono.Debugger.Soft
GET_MANIFEST_MODULE = 3,
GET_OBJECT = 4,
GET_TYPE = 5,
GET_NAME = 6
GET_NAME = 6,
GET_DOMAIN = 7
}
enum CmdModule {
@@ -590,6 +591,7 @@ namespace Mono.Debugger.Soft
GET_THIS = 2,
SET_VALUES = 3,
GET_DOMAIN = 4,
SET_THIS = 5,
}
enum CmdArrayRef {
@@ -2113,6 +2115,10 @@ namespace Mono.Debugger.Soft
return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_NAME, new PacketWriter ().WriteId (id)).ReadString ();
}
internal long Assembly_GetIdDomain (long id) {
return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_DOMAIN, new PacketWriter ().WriteId (id)).ReadId ();
}
/*
* TYPE
*/
@@ -2410,6 +2416,10 @@ namespace Mono.Debugger.Soft
return SendReceive (CommandSet.STACK_FRAME, (int)CmdStackFrame.GET_DOMAIN, new PacketWriter ().WriteId (thread_id).WriteId (id)).ReadId ();
}
internal void StackFrame_SetThis (long thread_id, long id, ValueImpl value) {
SendReceive (CommandSet.STACK_FRAME, (int)CmdStackFrame.SET_THIS, new PacketWriter ().WriteId (thread_id).WriteId (id).WriteValue (value));
}
/*
* ARRAYS
*/

View File

@@ -166,6 +166,15 @@ namespace Mono.Debugger.Soft
return vm.DecodeValue (vm.conn.StackFrame_GetThis (thread.Id, Id));
}
// Since protocol version 2.44
public void SetThis (Value value) {
if (value == null)
throw new ArgumentNullException ("value");
if (Method.IsStatic || !Method.DeclaringType.IsValueType)
throw new InvalidOperationException ("The frame's method needs to be a valuetype instance method.");
vm.conn.StackFrame_SetThis (thread.Id, Id, vm.EncodeValue (value));
}
public void SetValue (LocalVariable var, Value value) {
if (var == null)
throw new ArgumentNullException ("var");

View File

@@ -1 +1 @@
10f28bcfc8faf083f7bacd0efadc598a4bbba506
1d8f429b58b595754ddcbc30238a86f4f64a5050