Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyMirror.cs12
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs9
-rw-r--r--mcs/class/Mono.Debugger.Soft/Test/dtest.cs1
-rw-r--r--mono/mini/debugger-agent.c12
4 files changed, 29 insertions, 5 deletions
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyMirror.cs
index 9b0af4c77d2..a83daab43cb 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyMirror.cs
@@ -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);
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 3a1af2dc088..e09132e2798 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
@@ -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 = 44;
+ 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 {
@@ -2114,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
*/
diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
index ce74b4fd5fb..61b3e310881 100644
--- a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
+++ b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
@@ -3490,6 +3490,7 @@ public class DebuggerTests
// d_method is from another domain
MethodMirror d_method = (e as BreakpointEvent).Method;
Assert.IsTrue (m != d_method);
+ Assert.AreEqual (domain, d_method.DeclaringType.Assembly.Domain);
var frames = e.Thread.GetFrames ();
Assert.AreEqual ("invoke_in_domain", frames [0].Method.Name);
diff --git a/mono/mini/debugger-agent.c b/mono/mini/debugger-agent.c
index 7b0b052f450..518216b41d2 100644
--- a/mono/mini/debugger-agent.c
+++ b/mono/mini/debugger-agent.c
@@ -273,7 +273,7 @@ typedef struct {
#define HEADER_LENGTH 11
#define MAJOR_VERSION 2
-#define MINOR_VERSION 44
+#define MINOR_VERSION 45
typedef enum {
CMD_SET_VM = 1,
@@ -450,7 +450,8 @@ typedef enum {
CMD_ASSEMBLY_GET_MANIFEST_MODULE = 3,
CMD_ASSEMBLY_GET_OBJECT = 4,
CMD_ASSEMBLY_GET_TYPE = 5,
- CMD_ASSEMBLY_GET_NAME = 6
+ CMD_ASSEMBLY_GET_NAME = 6,
+ CMD_ASSEMBLY_GET_DOMAIN = 7
} CmdAssembly;
typedef enum {
@@ -8041,6 +8042,10 @@ assembly_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
mono_error_cleanup (&error);
return err;
}
+ case CMD_ASSEMBLY_GET_DOMAIN: {
+ buffer_add_domainid (buf, domain);
+ break;
+ }
case CMD_ASSEMBLY_GET_TYPE: {
MonoError error;
char *s = decode_string (p, &p, end);
@@ -9901,7 +9906,8 @@ static const char* assembly_cmds_str[] = {
"GET_MANIFEST_MODULE",
"GET_OBJECT",
"GET_TYPE",
- "GET_NAME"
+ "GET_NAME",
+ "GET_DOMAIN"
};
static const char* module_cmds_str[] = {