http://bugzilla.novell.com/show_bug.cgi?id=541052
User [email protected] added comment http://bugzilla.novell.com/show_bug.cgi?id=541052#c1 Martin Baulig <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FEATURE Summary|Inspecting value type |Inspecting empty value type |variable shows null value |variable shows null value --- Comment #1 from Martin Baulig <[email protected]> 2009-10-11 22:44:41 MDT --- I'd call this a feature, not a bug - and there's also nothing I can do about this in the debugger. Since the size of the struct is zero, the JIT doesn't allocate any storage for it. The same applies to the static field - it's a value type of zero size, so there's also no storage allocated for it, and the JIT also doesn't call any kind of .cctor for it. Things change when you add a field to it: ===== asg...@isengard:debugger$ cat test/V.cs using System; struct S { public int a; public static S Null = new S (); } class Program { static void Main (string[] args) { S s = new S (); s.a = 9; Environment.Exit (1); } } asg...@isengard:debugger$ mdb -run ./test/V.exe Mono Debugger Starting program: ./test/V.exe Thread @1 stopped at #0: 0x40e8a278 in Program.Main(string[])+0x28 at /work/asgard/debugger/test/V.cs:14. 14 s.a = 9; (mdb) p s (S) { a = 0 } (mdb) p S.Null (S) { a = 0 } (mdb) n Thread @1 stopped at #0: 0x40e8a28b in Program.Main(string[])+0x3b at /work/asgard/debugger/test/V.cs:15. 15 Environment.Exit (1); (mdb) p s (S) { a = 9 } (mdb) p S.Null (S) { a = 0 } ====== -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
