Author: ankit
Date: 2005-04-20 10:35:09 -0400 (Wed, 20 Apr 2005)
New Revision: 43342

Modified:
   trunk/mono/mono/dis/ChangeLog
   trunk/mono/mono/dis/get.c
Log:
In mono/dis:
        Fix #74521.
        * get.c (get_generic_param, get_method_core, get_methoddef): Dont use
        dis_stringify_object_with_class directly, use dis_stringify_type 
instead.

2005-04-20  Ankit Jain  <[EMAIL PROTECTED]>



Modified: trunk/mono/mono/dis/ChangeLog
===================================================================
--- trunk/mono/mono/dis/ChangeLog       2005-04-20 14:31:25 UTC (rev 43341)
+++ trunk/mono/mono/dis/ChangeLog       2005-04-20 14:35:09 UTC (rev 43342)
@@ -1,5 +1,11 @@
 2005-04-20  Ankit Jain  <[EMAIL PROTECTED]>
 
+       Fix #74521.
+       * get.c (get_generic_param, get_method_core, get_methoddef): Dont use
+       dis_stringify_object_with_class directly, use dis_stringify_type 
instead.
+
+2005-04-20  Ankit Jain  <[EMAIL PROTECTED]>
+
        Fix #74657.
        * main.c (dis_field_list): Print default value if field has
        HAS_DEFAULT flag set.

Modified: trunk/mono/mono/dis/get.c
===================================================================
--- trunk/mono/mono/dis/get.c   2005-04-20 14:31:25 UTC (rev 43341)
+++ trunk/mono/mono/dis/get.c   2005-04-20 14:35:09 UTC (rev 43342)
@@ -691,7 +691,7 @@
                                first = 0;
                        } else
                                g_string_append (result, ", ");
-                       sig = dis_stringify_object_with_class (m, *constr, 
TRUE, TRUE);
+                       sig = dis_stringify_type (m, &((*constr)->byval_arg), 
TRUE);
                        g_string_append (result, sig);
                        g_free (sig);
                 }
@@ -852,6 +852,9 @@
 {
        char *result, *esname;
 
+       if (c->rank || c->byval_arg.type == MONO_TYPE_PTR) 
+               g_assert (0);
+
        esname = get_escaped_name (c->name);
 
        if (c->nested_in){
@@ -872,7 +875,8 @@
 dis_stringify_object_with_class (MonoImage *m, MonoClass *c, gboolean prefix, 
gboolean is_def)
 {
        /* FIXME: handle MONO_TYPE_OBJECT ... */
-       const char *otype = c->byval_arg.type == MONO_TYPE_VALUETYPE ? 
"valuetype " : "class " ;
+       MonoType *type = &c->byval_arg;
+       const char *otype = type->type == MONO_TYPE_VALUETYPE ? "valuetype " : 
"class " ;
        char *assemblyref = NULL, *result, *esname, *generic = NULL;
        
        if (m != c->image) {
@@ -1621,7 +1625,7 @@
                if (mono_method_signature (mh)->is_inflated)
                        context = ((MonoMethodInflated *) mh)->context;
                esname = get_escaped_name (mh->name);
-               sig = dis_stringify_object_with_class (m, mh->klass, TRUE, 
TRUE);
+               sig = dis_stringify_type (m, &mh->klass->byval_arg, TRUE);
                if (show_tokens)
                        name = g_strdup_printf ("%s/*%08x*/::%s", sig, token, 
esname);
                else
@@ -1701,7 +1705,7 @@
 
        mh = mono_get_method (m, MONO_TOKEN_METHOD_DEF | idx, NULL);
        if (mh) {
-               sig = dis_stringify_object_with_class (m, mh->klass, TRUE, 
FALSE);
+               sig = dis_stringify_type (m, &mh->klass->byval_arg, FALSE);
                name = g_strdup_printf ("%s::%s", sig, mh->name);
                g_free (sig);
        } else

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to