* dump.c/h: New function to dump the contents of the blob
authorJackson Harper <jackson@novell.com>
Sun, 20 Jun 2004 01:46:44 +0000 (01:46 -0000)
committerJackson Harper <jackson@novell.com>
Sun, 20 Jun 2004 01:46:44 +0000 (01:46 -0000)
stream. I found it useful for debugging so I will share.
* main.c: Add --blob switch to dump the blob stream.

svn path=/trunk/mono/; revision=29967

mono/dis/ChangeLog
mono/dis/dump.c
mono/dis/dump.h
mono/dis/main.c

index 8c72885d6ffb2b1673b146a5c5ab9c4f93a09272..1a486ac71e8fa6aa6c198e7e2f1054577a136a31 100644 (file)
@@ -1,3 +1,9 @@
+2004-06-19  Jackson Harper  <jackson@ximian.com>
+
+       * dump.c/h: New function to dump the contents of the blob
+       stream. I found it useful for debugging so I will share.
+       * main.c: Add --blob switch to dump the blob stream.
+       
 2004-06-19  Jackson Harper  <jackson@ximian.com>
 
        * get.c/h: New function to stringify function pointers.
index 753d79b859e60a1f79497ace724af8789c4cb932..fb44d63e8df5eb9ffc3304cf4342227ecafa8ab3 100644 (file)
@@ -1116,3 +1116,19 @@ dump_table_parconstraint (MonoImage *m)
        }
 }
 
+void
+dump_stream_blob (MonoImage *m)
+{
+       int i;
+
+       fprintf (output, "Blob heap contents\n");
+
+       for (i = 0; i < m->heap_blob.size; i++) {
+               fprintf (output, "%x ", m->heap_blob.data [i]);
+               if (i > 0 && (i % 25) == 0)
+                       fprintf (output, "\n");
+       }
+
+       fprintf (output, "\n");
+}
+
index 4699a732c1db44d711950f545601109e571eec9f..687d525a8caa6fa67a000881c266ae00523ef989 100644 (file)
@@ -30,3 +30,4 @@ void dump_table_genericpar   (MonoImage *m);
 void dump_table_methodspec   (MonoImage *m);
 void dump_table_parconstraint(MonoImage *m);
 void dump_table_implmap      (MonoImage *m);
+void dump_stream_blob        (MonoImage *m);
index 957bd55489123dbdad892d2f9bab770564415216..4497a330fe4403ca09c21312018e8dc2575fcccc 100644 (file)
@@ -1148,6 +1148,7 @@ struct {
        { "--typeref",     MONO_TABLE_TYPEREF,          dump_table_typeref },
        { "--typespec",    MONO_TABLE_TYPESPEC,         dump_table_typespec },
        { "--implmap",     MONO_TABLE_IMPLMAP,          dump_table_implmap },
+       { "--blob",        NULL,                        dump_stream_blob },
        { NULL, -1 }
 };