[Mono-bugs] [Bug 81623][Maj] New - Static .cctors and Main()

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon May 14 16:19:57 EDT 2007


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 martin at ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=81623

--- shadow/81623	2007-05-14 16:19:56.000000000 -0400
+++ shadow/81623.tmp.7008	2007-05-14 16:19:56.000000000 -0400
@@ -0,0 +1,39 @@
+Bug#: 81623
+Product: Mono: Debugger
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: backend
+AssignedTo: martin at ximian.com                            
+ReportedBy: martin at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Static .cctors and Main()
+
+We currently have a problem with the way how the debugger breaks in Main:
+
+If you're debugging an application where the class containing Main()
+contains a static .cctor, you might run into problems.  This applies
+especially if your application is using System.Configuration in that .cctor
+or if the class has static fields which are using System.Configuration.
+
+I'm currently working on a fix, but that'll require some larger changes in
+the way how the debugger handles Main().
+
+At the moment, the debugger gets a notification from the JIT before calling
+mono_runtime_run_main() - this notification triggers a JIT compilation of
+Main() and inserts a breakpoint on it.  This is neccessary because the
+debugger may need to insert breakpoints when reaching Main().
+
+Unfortunately, this is causing problems if that compilation needs to run
+any static .cctors.
+
+I'll change the code to not trigger the compilation but instead wait till
+we reach Main() by normal flow of execution - don't know yet how exactly
+this will be archived.


More information about the mono-bugs mailing list