2005-07-05 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mono / metadata / debug-helpers.c
index 2867e36c307435ed22ecb838f67c68c9306424f4..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",
@@ -261,9 +263,9 @@ mono_method_desc_match (MonoMethodDesc *desc, MonoMethod *method)
                return FALSE;
        if (!desc->args)
                return TRUE;
-       if (desc->num_args != method->signature->param_count)
+       if (desc->num_args != mono_method_signature (method)->param_count)
                return FALSE;
-       sig = mono_signature_get_desc (method->signature, desc->include_namespace);
+       sig = mono_signature_get_desc (mono_method_signature (method), desc->include_namespace);
        if (strcmp (sig, desc->args)) {
                g_free (sig);
                return FALSE;
@@ -285,13 +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);
-       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;
 }
 
@@ -509,7 +510,7 @@ mono_method_full_name (MonoMethod *method, gboolean signature)
        const char *nspace = method->klass->name_space;
 
        if (signature) {
-               char *tmpsig = mono_signature_get_desc (method->signature, TRUE);
+               char *tmpsig = mono_signature_get_desc (mono_method_signature (method), TRUE);
 
                if (method->wrapper_type != MONO_WRAPPER_NONE)
                        sprintf (wrapper, "(wrapper %s) ", wrapper_type_to_str (method->wrapper_type));
@@ -528,23 +529,3 @@ mono_method_full_name (MonoMethod *method, gboolean signature)
 
        return res;
 }
-
-MonoMethod *
-mono_find_method_by_name (MonoClass *klass, const char *name, int param_count)
-{
-       MonoMethod *res = NULL;
-       int i;
-
-       mono_class_init (klass);
-
-       for (i = 0; i < klass->method.count; ++i) {
-               if (klass->methods [i]->name[0] == name [0] && 
-                   !strcmp (name, klass->methods [i]->name) &&
-                   klass->methods [i]->signature->param_count == param_count) {
-                       res = klass->methods [i];
-                       break;
-               }
-       }
-       return res;
-}
-