+ MonoImage *image = GUINT_TO_POINTER ((gsize) image_argument);
+ MonoDebugMethodAddressList *info;
+ MonoClass *klass;
+ int i;
+
+ mono_debugger_lock ();
+
+ klass = mono_debugger_register_class_init_callback (image, class_name, token, index);
+ if (!klass || !klass->inited || !klass->methods) {
+ mono_debugger_unlock ();
+ return 0;
+ }
+
+ for (i = 0; i < klass->method.count; i++) {
+ MonoMethod *method = klass->methods [i];
+
+ if (method->token != token)
+ continue;
+
+ if (method->iflags & METHOD_IMPL_ATTRIBUTE_RUNTIME) {
+ const char *name = method->name;
+ MonoMethod *nm = NULL;
+
+ if (method->klass->parent == mono_defaults.multicastdelegate_class) {
+ if (*name == 'I' && (strcmp (name, "Invoke") == 0))
+ nm = mono_marshal_get_delegate_invoke (method, NULL);
+ else if (*name == 'B' && (strcmp (name, "BeginInvoke") == 0))
+ nm = mono_marshal_get_delegate_begin_invoke (method);
+ else if (*name == 'E' && (strcmp (name, "EndInvoke") == 0))
+ nm = mono_marshal_get_delegate_end_invoke (method);
+ }
+
+ if (!nm) {
+ mono_debugger_unlock ();
+ return 0;
+ }
+
+ method = nm;
+ }
+
+ info = mono_debug_lookup_method_addresses (method);
+ mono_debugger_unlock ();
+ return (guint64) (gsize) info;
+ }
+
+ mono_debugger_unlock ();