[Mono-bugs] [Bug 38126][Nor] New - MCS debugging information off-by-one error
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Fri, 14 Feb 2003 16:40:49 -0500 (EST)
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 miguel@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=38126
--- shadow/38126 Fri Feb 14 16:40:49 2003
+++ shadow/38126.tmp.4612 Fri Feb 14 16:40:49 2003
@@ -0,0 +1,45 @@
+Bug#: 38126
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: martin@ximian.com
+ReportedBy: miguel@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: MCS debugging information off-by-one error
+
+When compiling the following program with mcs -g, and running it with mono
+--debug, the line reported for the NullReference exception is line 8, but
+line 8 contains a WriteLine. The real line is Line 9.using System;
+class X {
+
+ static void Main ()
+ {
+ X x = null;
+
+ Console.WriteLine ("Line 8");
+ x.Op ();
+ Console.WriteLine ("Line 10");
+ }
+
+ void Op ()
+ {
+ }
+}
+
+mcs -g mb.cs
+mono --debug mb.ex
+Line 8
+
+Unhandled Exception: System.NullReferenceException: A null value was found
+where an object instance was required in [0x00002] (at
+/cvs/mcs/mcs/mb.cs:8) 00 .X:Main ()
+e