Permalink
Browse files

Switch to the domain of the assembly in question while executing CMD_…

…ASSEMBLY_GET_TYPE, so referenced assemblies are found. Fixes #679586.
  • Loading branch information...
1 parent c3e6d8a commit 98f4357c92c37f6fef89ae148ecb7cff9b28b994 @vargaz vargaz committed Mar 17, 2011
Showing with 8 additions and 1 deletion.
  1. +8 −1 mono/mini/debugger-agent.c
View
9 mono/mini/debugger-agent.c
@@ -5263,7 +5263,12 @@ assembly_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
gboolean ignorecase = decode_byte (p, &p, end);
MonoTypeNameParse info;
MonoType *t;
- gboolean type_resolve;
+ gboolean type_resolve, res;
+ MonoDomain *d = mono_domain_get ();
+
+ /* This is needed to be able to find referenced assemblies */
+ res = mono_domain_set (domain, FALSE);
+ g_assert (res);
if (!mono_reflection_parse_type (s, &info)) {
t = NULL;
@@ -5276,6 +5281,8 @@ assembly_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
mono_reflection_free_type_info (&info);
g_free (s);
+ mono_domain_set (d, TRUE);
+
break;
}
case CMD_ASSEMBLY_GET_NAME: {

0 comments on commit 98f4357

Please sign in to comment.