Skip to content

Commit

Permalink
Switch to the domain of the assembly in question while executing CMD_…
Browse files Browse the repository at this point in the history
…ASSEMBLY_GET_TYPE, so referenced assemblies are found. Fixes #679586.
  • Loading branch information
vargaz committed Mar 17, 2011
1 parent ec56b23 commit f1e5ff5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mono/mini/debugger-agent.c
Expand Up @@ -5754,7 +5754,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;
Expand All @@ -5767,6 +5772,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: {
Expand Down

0 comments on commit f1e5ff5

Please sign in to comment.