Bug 11599 - Stack trace of dynamically generated assembly is missing debug information
Summary: Stack trace of dynamically generated assembly is missing debug information
Status: CONFIRMED
Alias: None
Product: Runtime
Classification: Mono
Component: JIT (show other bugs)
Version: unspecified
Hardware: PC All
: --- enhancement
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-04-04 21:30 UTC by rowzydower
Modified: 2018-01-18 21:16 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Source code to create a dynamic assembly that throws an error with debug info (6.33 KB, application/zip)
2013-04-04 21:30 UTC, rowzydower
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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 original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description rowzydower 2013-04-04 21:30:42 UTC
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
 	[External Code]	

	MonoBug.exe!CompileExpression.CompileAndRun(System.Linq.Expressions.Lambda
Expression expression) Line 47 + 0x49 bytes	C#
 	MonoBug.exe!MainClass.Main() Line 6 + 0x8 bytes	C#
 	[External Code]	

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.
Comment 1 Ludovic Henry 2018-01-18 21:16:28 UTC
I can reproduce with Mono 5.11.0.276 (master/117468d740a)