Bug 5387 - Step into does not always work
Summary: Step into does not always work
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2012-05-29 05:09 UTC by Marek Safar
Modified: 2012-06-08 12:01 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Marek Safar 2012-05-29 05:09:16 UTC
using System;

class Program
{
	static int Main ()
	{
		dynamic d = 1;
		int a = d;
		return 0;
	}
}


Then set a breakpoint in file /git/mono/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UpdateDelegates.Generated.cs at line 255

It should be line "rule = @this.Target = @this.Binder.BindCore(@this, args);"

Start debugging and when hit the breakpoint do Step Into. Debugger stop in the middle of BindCore method.
Comment 1 Zoltan Varga 2012-06-03 05:51:03 UTC
I can somewhat repro this. For me, md doesn't stop anywhere, it just keeps running slowly.
Comment 2 Zoltan Varga 2012-06-03 07:55:53 UTC
So the problem here is that there is no sequence point between the get_Binder () call and the BindCore () call. mcs doesn't generate a nop, and we don't automatically add a sequence point because the IL stack is not empty.
Comment 3 Zoltan Varga 2012-06-03 08:08:17 UTC
md issues a step in, then notices that it stepped into a property accessor, so it issues a step out, which should stop in the caller, but the caller has no sequence point between the get_Binder and BindCore () calls.
Comment 4 Marek Safar 2012-06-08 12:01:54 UTC
Fixed in master