2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mono / metadata / debug-helpers.c
index d1eae8f160016406e9fadb15eba4632fcbddace9..010c49b72e7d650ca6ab1851005e20d0457035a2 100644 (file)
@@ -29,6 +29,8 @@ static const char *wrapper_type_names [] = {
        "xdomain-dispatch",
        "ldfld",
        "stfld",
+       "ldfld-remote",
+       "stfld-remote",
        "synchronized",
        "dynamic-method",
        "isinst",
@@ -285,14 +287,12 @@ mono_method_desc_full_match (MonoMethodDesc *desc, MonoMethod *method)
 MonoMethod*
 mono_method_desc_search_in_class (MonoMethodDesc *desc, MonoClass *klass)
 {
-       int i;
-
-       mono_class_init (klass);
-       mono_class_setup_methods (klass);
-       for (i = 0; i < klass->method.count; ++i) {
-               if (mono_method_desc_match (desc, klass->methods [i]))
-                       return klass->methods [i];
-       }
+       MonoMethod* m;
+       gpointer iter = NULL;
+       
+       while ((m = mono_class_get_methods (klass, &iter)))
+               if (mono_method_desc_match (desc, m))
+                       return m;
        return NULL;
 }