Author: ankit
Date: 2006-05-15 11:05:21 -0400 (Mon, 15 May 2006)
New Revision: 60709

Modified:
   branches/mono-1-1-13/mono/mono/dis/ChangeLog
   branches/mono-1-1-13/mono/mono/dis/dis-cil.c
Log:
* dis-cil.c (disassemble_cil): Exception clauses can be unordered,
handle that.


Modified: branches/mono-1-1-13/mono/mono/dis/ChangeLog
===================================================================
--- branches/mono-1-1-13/mono/mono/dis/ChangeLog        2006-05-15 14:51:04 UTC 
(rev 60708)
+++ branches/mono-1-1-13/mono/mono/dis/ChangeLog        2006-05-15 15:05:21 UTC 
(rev 60709)
@@ -1,3 +1,8 @@
+2006-05-15  Ankit Jain  <[EMAIL PROTECTED]>
+
+       * dis-cil.c (disassemble_cil): Exception clauses can be unordered,
+       handle that.
+
 2006-05-11  Ankit Jain  <[EMAIL PROTECTED]>
 
        * get.c (get_custom_mod): Fix printing of custom modifiers.

Modified: branches/mono-1-1-13/mono/mono/dis/dis-cil.c
===================================================================
--- branches/mono-1-1-13/mono/mono/dis/dis-cil.c        2006-05-15 14:51:04 UTC 
(rev 60708)
+++ branches/mono-1-1-13/mono/mono/dis/dis-cil.c        2006-05-15 15:05:21 UTC 
(rev 60709)
@@ -63,7 +63,7 @@
        const unsigned char *ptr = start;
        const MonoOpcode *entry;
        char indent[1024];
-       int i, indent_level = 0;
+       int i, j, indent_level = 0;
        gboolean in_fault = 0;
        const char *clause_names[] = {"catch", "filter", "finally", "", 
"fault"};
        gboolean *trys = NULL;
@@ -82,11 +82,16 @@
               trys = g_malloc0 (sizeof (gboolean) * mh->num_clauses);
               trys [0] = 1;
               for (i=1; i < mh->num_clauses; ++i) {
-#define pcl mh->clauses [i-1]  
+#define jcl mh->clauses [j]    
 #define cl mh->clauses [i]     
-                      if (pcl.try_offset != cl.try_offset || pcl.try_len != 
cl.try_len)
-                              trys [i] = 1;
-#undef pcl
+                      trys [i] = 1;
+                      for (j = 0; j < i; j++) {
+                              if (cl.try_offset == jcl.try_offset && 
cl.try_len == jcl.try_len) {
+                                      trys [i] = 0;
+                                      break;
+                              }
+                      }
+#undef jcl
 #undef cl
               }
        }

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

Reply via email to