Bugzilla – Bug 316259
problem with first call after try/finally block
Last modified: 2007-09-15 21:24:34 UTC
---- Reported by toshok@ximian.com 2004-10-18 15:05:18 MST ---- 1) if you set a breakpoint on the first line of code following a try/catch/following block, you can't step over it. If you enter "next", you are presented with: SSE (3:8937:417f5bb0) stepping over current breakpoint 4 at 0x413ebc12 SSE (3:8937:417f5bb0) stepped over breakpoint 4: 0x08267928 SSE (3:8937:417f5bb0) stepped over breakpoint: ChildEvent (CHILD_STOPPED:0:0:0) (57f) Operation (NextLine:0x00000000:SingleInstruction:StepFrame (0x413ebc12,0x413ebc17,Finish,)) SSE (3:8937:417f5bb0) hit temporary breakpoint at 0x08267928 Invalid trampoline sequence: c3 cc 11 bd e7 c6 6a ** ERROR **: file tramp-x86.c: line 148 (x86_magic_trampoline): should not be reached aborting... 2) if in the same case as (1), you step *into* the method, you get: (mdb) s 0x41680bb0 trying to lock command_mutex 0x41680bb0 locked command_mutex SSE (3:22100:417f5bb0) starting Operation (StepLine:0x00000000:SingleInstruction:StepFrame (0x413ebc17,0x413ebc1c,StepFrame,Mono.Debugger.Languages.CSharp.MonoCSharpLanguageBackend)) SSE (3:22100:417f5bb0) stepping at 0x413ebc17 in StepFrame (0x413ebc17,0x413ebc1c,StepFrame,Mono.Debugger.Languages.CSharp.MonoCSharpLanguageBackend) True SSE (3:22100:417f5bb0) found trampoline 0x0824f100/False (compile is 0x0804986f) Mono.Debugger.Backends.SingleSteppingEngine+CallbackCompileMethod compiled trampoline: 0x413ebdc8 Mono.Debugger.Languages.CSharp.MonoSymbolFile+MonoMethod(X.TestUsing(),0x413ebdc8,0x413ebea3) Mono.Debugger.Languages.CSharp.MonoSymbolFile (/home/toshok/src/mono/debugger/test/test-try.exe:True:True:True:True) True Mono.Debugger.Backends.SingleSteppingEngine+CallbackCompileMethod entering trampoline: 0x413ebdc8 SSE (3:22100:417f5bb0) stepping over current breakpoint 4 at 0x413ebc17 SSE (3:22100:417f5bb0) stepped over breakpoint 4: 0x413ebdc8 SSE (3:22100:417f5bb0) stepped over breakpoint: ChildEvent (CHILD_HIT_BREAKPOINT:5:0:0) (57f) Operation (StepLine:0x00000000:SingleInstruction:StepFrame (0x413ebc17,0x413ebc1c,StepFrame,Mono.Debugger.Languages.CSharp.MonoCSharpLanguageBackend)) and the debugger hangs. ---- Additional Comments From martin@ximian.com 2004-10-20 02:06:26 MST ---- Hmm, I can't reproduce either of these. Could you please attach a test case and - if possible - also the output of a `dis -method' in the debugger ? ---- Additional Comments From martin@ximian.com 2004-10-20 02:09:03 MST ---- In general, the first bug (1) happens when the debugger fails to detect a trampoline sequence. The JIT's trampoline code looks at the instruction immediately following the trampoline call - because of this, the debugger needs some special magic: it cannot insert a temporary breakpoint after the trampoline call since then the trampoline would see a corrupted next instruction. ---- Additional Comments From toshok@ximian.com 2004-10-20 15:49:42 MST ---- this seems to have been fixed after today's exception work. Unknown operating system unknown. Setting to default OS "Other".