[Mono-bugs] [Bug 75544][Nor] New - monodis error decoding Ldtoken
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Jul 13 15:18:36 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by vgough at pobox.com.
http://bugzilla.ximian.com/show_bug.cgi?id=75544
--- shadow/75544 2005-07-13 15:18:36.000000000 -0400
+++ shadow/75544.tmp.17805 2005-07-13 15:18:36.000000000 -0400
@@ -0,0 +1,53 @@
+Bug#: 75544
+Product: Mono: Tools
+Version: 1.1
+OS:
+OS Details: Suse 9.2 / ix86
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: tools
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: vgough at pobox.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: monodis error decoding Ldtoken
+
+Monodis dies when it tries to decode IL code generated by
+ILGenerator.Emit(OpCodes.Ldtoken, MethodInfo).
+
+Version info:
+> rpm -qf `which monodis`
+mono-devel-1.1.8.2-0.novell
+
+
+From my example, I have:
+void Emit_MethodInfo(ILGenerator ig, MethodInfo method)
+{
+ ig.Emit( OpCodes.Ldtoken, method, method ); // this kills monodis
+ ig.Emit( OpCodes.Call,
+ typeof(MethodBase).GetMethod("GetMethodFromHandle");
+ ig.Emit( OpCodes.Castclass, typeof(MethodInfo) );
+}
+
+The code runs, but when I try and use monodis to view the code, I get:
+
+ // method line 2
+ .method public final virtual hidebysig newslot
+ instance default void foo () cil managed
+ {
+ // Method begins at RVA 0x20f8
+ // Code size 24 (0x18)
+ .maxstack 8
+ IL_0000: ldarg.0
+
+** ERROR **: Do not know how to decode tokens of type 0x0a000002
+aborting...
+ IL_0001: ldtoken Aborted
+
+I have also seen "... type 0x0a000003".
+
+I will attach a full working sample which can generate a .dll for testing.
More information about the mono-bugs
mailing list