Author: ankit
Date: 2006-05-15 10:51:04 -0400 (Mon, 15 May 2006)
New Revision: 60708
Modified:
trunk/mono/mono/dis/ChangeLog
trunk/mono/mono/dis/dis-cil.c
Log:
* dis-cil.c (disassemble_cil): Exception clauses can be unordered,
handle that.
Modified: trunk/mono/mono/dis/ChangeLog
===================================================================
--- trunk/mono/mono/dis/ChangeLog 2006-05-15 14:29:16 UTC (rev 60707)
+++ trunk/mono/mono/dis/ChangeLog 2006-05-15 14:51:04 UTC (rev 60708)
@@ -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: trunk/mono/mono/dis/dis-cil.c
===================================================================
--- trunk/mono/mono/dis/dis-cil.c 2006-05-15 14:29:16 UTC (rev 60707)
+++ trunk/mono/mono/dis/dis-cil.c 2006-05-15 14:51:04 UTC (rev 60708)
@@ -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