Skip to content

Commit

Permalink
2004-06-29 Martin Baulig <martin@ximian.com>
Browse files Browse the repository at this point in the history
	* mono-debug.c (mono_debug_add_method): Protect the whole function
	in mono_debugger_lock(), not just parts of it.

svn path=/trunk/mono/; revision=30505
  • Loading branch information
Martin Baulig committed Jun 29, 2004
1 parent da7a16c commit 3b6be82
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
4 changes: 4 additions & 0 deletions mono/metadata/ChangeLog
@@ -1,3 +1,7 @@
2004-06-29 Martin Baulig <martin@ximian.com>

* mono-debug.c (mono_debug_add_method): Protect the whole function
in mono_debugger_lock(), not just parts of it.

Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>

Expand Down
16 changes: 11 additions & 5 deletions mono/metadata/mono-debug.c
Expand Up @@ -266,23 +266,29 @@ mono_debug_add_method (MonoMethod *method, MonoDebugMethodJitInfo *jit, MonoDoma
MonoDebugHandle *handle;
MonoDebugMethodInfo *minfo;

mono_debugger_lock ();

mono_class_init (klass);

if ((method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) ||
(method->iflags & METHOD_IMPL_ATTRIBUTE_RUNTIME) ||
(method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL) ||
(method->flags & METHOD_ATTRIBUTE_ABSTRACT))
(method->flags & METHOD_ATTRIBUTE_ABSTRACT)) {
mono_debugger_unlock ();
return;
}

handle = _mono_debug_get_image (klass->image);
if (!handle)
if (!handle) {
mono_debugger_unlock ();
return;
}

minfo = _mono_debug_lookup_method (method);
if (!minfo)
if (!minfo) {
mono_debugger_unlock ();
return;

mono_debugger_lock ();
}

domain_data = mono_debug_get_domain_data (handle, domain);
if (domain_data->jit [minfo->index]) {
Expand Down

0 comments on commit 3b6be82

Please sign in to comment.