X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fdebugger-agent.c;h=c7e18a0f0d9af49c4a515e255662d5781568a4e1;hb=08a728d237965feb2bbd485f909998b17c0bbb11;hp=e69085073ec92c79b6f8f916477963336506168a;hpb=c92b046a661169fec8302d7ff17454d5b63d108b;p=mono.git diff --git a/mono/mini/debugger-agent.c b/mono/mini/debugger-agent.c index e69085073ec..c7e18a0f0d9 100644 --- a/mono/mini/debugger-agent.c +++ b/mono/mini/debugger-agent.c @@ -6,6 +6,7 @@ * * Copyright 2009-2010 Novell, Inc. * Copyright 2011 Xamarin Inc. + * Licensed under the MIT license. See LICENSE file in the project root for full license information. */ #include @@ -7257,7 +7258,7 @@ vm_commands (int command, int id, guint8 *p, guint8 *end, Buffer *buf) MonoError error; type_resolve = TRUE; /* FIXME really okay to call while holding locks? */ - t = mono_reflection_get_type_checked (ass->image, &info, ignore_case, &type_resolve, &error); + t = mono_reflection_get_type_checked (ass->image, ass->image, &info, ignore_case, &type_resolve, &error); mono_error_cleanup (&error); if (t) { g_ptr_array_add (res_classes, mono_type_get_class (t)); @@ -7691,7 +7692,7 @@ assembly_commands (int command, guint8 *p, guint8 *end, Buffer *buf) } else { if (info.assembly.name) NOT_IMPLEMENTED; - t = mono_reflection_get_type_checked (ass->image, &info, ignorecase, &type_resolve, &error); + t = mono_reflection_get_type_checked (ass->image, ass->image, &info, ignorecase, &type_resolve, &error); if (!is_ok (&error)) { mono_error_cleanup (&error); /* FIXME don't swallow the error */ mono_reflection_free_type_info (&info); @@ -9674,6 +9675,7 @@ wait_for_attach (void) static guint32 WINAPI debugger_thread (void *arg) { + MonoError error; int res, len, id, flags, command = 0; CommandSet command_set = (CommandSet)0; guint8 header [HEADER_LENGTH]; @@ -9689,8 +9691,11 @@ debugger_thread (void *arg) debugger_thread_id = mono_native_thread_id_get (); attach_cookie = mono_jit_thread_attach (mono_get_root_domain (), &attach_dummy); + MonoInternalThread *thread = mono_thread_internal_current (); + mono_thread_set_name_internal (thread, mono_string_new (mono_get_root_domain (), "Debugger agent"), TRUE, &error); + mono_error_assert_ok (&error); - mono_thread_internal_current ()->flags |= MONO_THREAD_FLAG_DONT_MANAGE; + thread->flags |= MONO_THREAD_FLAG_DONT_MANAGE; mono_set_is_debugger_attached (TRUE);