Bugzilla – Bug 317728
Incorrect variable lifetime
Last modified: 2007-09-15 21:24:34 UTC
---- Reported by toshok@ximian.com 2005-04-17 21:20:05 MST ---- the attached test shows it. if you step from the assignment of xml_test to the assignment of string_test and do "show locals", you'll see: Process @3 stopped at #0: 0xb768f434 in MainClass.Main(System.String[])+0x44 at /home/toshok/src/debugger-tests/VisualizerTest.cs:9. 9 string string_test = "Hello World!"; (mdb) show locals html_test = (System.String) "<xml><prop/> <prop2><subprop/></prop2></xml>" xml_test = (System.String) "<xml><prop/> <prop2><subprop/></prop2></xml>" string_test = (System.String) <cannot display object> Either html_test should retain it's value, or it should be removed from the list of locals (if the jit has deemed it no longer in scope.) This is probably happening because the debugger assumes that if a variable is not in a nested block (i.e. if it's at the toplevel for a method), it is live for the entire method. ---- Additional Comments From toshok@ximian.com 2005-04-17 21:20:35 MST ---- Created an attachment (id=167763) the test ---- Additional Comments From miguel@ximian.com 2005-09-05 13:52:40 MST ---- reassigning to new debugger owner. ---- Additional Comments From martin@ximian.com 2006-06-12 11:06:21 MST ---- *** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO75572 *** Imported an attachment (id=167763) Unknown operating system unknown. Setting to default OS "Other". This bug was marked DUPLICATE in the database it was moved from. Changing resolution to "MOVED"