[Mono-bugs] [Bug 74805][Maj] New - sometimes setting a variable doesn't change the inferior's execution
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Tue, 3 May 2005 03:51:03 -0400 (EDT)
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 toshok@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=74805
--- shadow/74805 2005-05-03 03:51:03.000000000 -0400
+++ shadow/74805.tmp.22444 2005-05-03 03:51:03.000000000 -0400
@@ -0,0 +1,70 @@
+Bug#: 74805
+Product: Mono: Debugger
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: backend
+AssignedTo: toshok@ximian.com
+ReportedBy: toshok@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: sometimes setting a variable doesn't change the inferior's execution
+
+something's wrong between the jit and debugger, most probably. Take the
+following test:
+
+using System;
+
+public class X
+{
+ public static bool foo() {
+ return false;
+ }
+
+ public static void Main (string[] args) {
+ bool ok = foo();
+
+ if (ok)
+ Console.WriteLine ("true");
+ else
+ Console.WriteLine ("false");
+ }
+}
+
+---
+
+If you run this program and step to the "if (ok)" line:
+
+Process @4 stopped at #0: 0x40d203fd in X.Main(System.String[])+0x1d at
+/home/toshok/src/debugger-tests/bool-set.cs:12.
+ 12 if (ok)
+(mdb) print ok
+(System.Boolean) False
+(mdb) set ok = true
+(mdb) print ok
+(System.Boolean) True
+(mdb) c
+false
+Process @4 terminated normally.
+
+---
+
+Now, if we insert another statement between the initialization and the if
+(it doesn't matter what it is), and debug that program, stopping at the
+extra statement:
+
+Process @4 stopped at #0: 0x40d203fb in X.Main(System.String[])+0x1b at
+/home/toshok/src/debugger-tests/bool-set.cs:12.
+ 12 foo ();
+(mdb) print ok
+(System.Boolean) False
+(mdb) set ok = true
+(mdb) c
+true
+Process @4 terminated normally.