[Mono-bugs] [Bug 541840] Cannot inspect any exception variable
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Oct 9 11:41:05 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=541840
User martin at novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=541840#c5
--- Comment #5 from Martin Baulig <martin at novell.com> 2009-10-09 09:41:04 MDT ---
This is a compiler bug, it's emitting incorrect symbol information.
The method is compiled as:
=====
.try { // 0
IL_0000: ldstr "k5"
IL_0005: call int32 int32::Parse(string)
IL_000a: pop
IL_000b: leave IL_001c
} // end .try 0
catch class [mscorlib]System.Exception { // 0
IL_0010: stloc.0
IL_0011: ldloc.0
IL_0012: call void class [mscorlib]System.Console::WriteLine(object)
IL_0017: leave IL_001c
} // end handler 0
IL_001c: ret
=====
and we emit
=====
Method 2 (6000002) - Program.Main(string[])
CodeBlock [CodeBlock 0:-1:Lexical:0:b]
CodeBlock [CodeBlock 1:-1:Lexical:10:10]
CodeBlock [CodeBlock 2:-1:Lexical:11:17]
Local [LocalVariable e:0:1]
=====
The first lexical block is correct (csc marks the 'leave' as 'hidden', but
that's not a problem).
The second one isn't needed at all and should be removed.
The third block has correct start / end offsets, but the exception variable
points to block 2 and not 3.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list