Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 11599 on
GitHub or Developer Community if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 3754 [details]
Source code to create a dynamic assembly that throws an error with debug info
The attached code creates a dynamic assembly and writes a method containing debug information.
.NET gave the following exception information:
MonoBug.exe!MakeExpression.ThrowError() Line 9 + 0x2e bytes C#
-> onlyModule.dll!MyDynamicType.MyMethod() Line 42 + 0x6 bytes Unknown
Expression expression) Line 47 + 0x49 bytes C#
MonoBug.exe!MainClass.Main() Line 6 + 0x8 bytes C#
Line 2 is the important one: It showed that the error had debug information of line 42.
Mono gives the following information instead:
at MyDynamicType.MyMethod () [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object,System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object parameters, System.Globalization.CultureInfo culture) [0x000d5] in /builddir/build/BUILD/mono-2.10.8/mcs/class/corlib/System.Reflection/MonoMethod.cs:226
The line number of the error is missing.
I can reproduce with Mono 22.214.171.1246 (master/117468d740a)