Added MonoString<->UTF-32 conversion helper functions.
[mono.git] / mono / metadata / debug-helpers.c
index f868aa37864f4b6a29a22da3d790a4fcf17c4db7..aa62ad230e5cc51e95cabfaa96f6748dcc51e4f4 100644 (file)
@@ -326,10 +326,10 @@ mono_method_desc_new (const char *name, gboolean include_namespace)
                g_free (class_nspace);
                return NULL;
        }
-       *method_name++ = 0;
        /* allow two :: to separate the method name */
-       if (*method_name == ':')
-               method_name++;
+       if (method_name != class_nspace && method_name [-1] == ':')
+               method_name [-1] = 0;
+       *method_name++ = 0;
        class_name = strrchr (class_nspace, '.');
        if (class_name) {
                *class_name++ = 0;
@@ -468,6 +468,8 @@ match_class (MonoMethodDesc *desc, int pos, MonoClass *klass)
 gboolean
 mono_method_desc_full_match (MonoMethodDesc *desc, MonoMethod *method)
 {
+       if (!desc->klass)
+               return FALSE;
        if (!match_class (desc, strlen (desc->klass), method->klass))
                return FALSE;
 
@@ -573,7 +575,7 @@ dis_one (GString *str, MonoDisHelper *dh, MonoMethod *method, const unsigned cha
                size_t len2;
                char *blob2 = NULL;
 
-               if (!method->klass->image->dynamic) {
+               if (!image_is_dynamic (method->klass->image) && !method_is_dynamic (method)) {
                        token = read32 (ip);
                        blob = mono_metadata_user_string (method->klass->image, mono_metadata_token_index (token));