Bug 15168 - Stepping from property does not stop at caller frame
Summary: Stepping from property does not stop at caller frame
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: Debugger ()
Version: 3.2.x
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2013-10-03 10:27 UTC by Marek Safar
Modified: 2015-01-07 11:51 UTC (History)
4 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 2013-10-03 10:27:59 UTC
http://screencast.com/t/Q6DyQNh8

Sample code

using System;
using System.Net.Http;

class Test
{
	public static void Main ()
	{
		var userAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Mobile/11A465";
		var client = new HttpClient();
		client.DefaultRequestHeaders.UserAgent.ParseAdd(userAgent);
	}
}
Comment 1 Zoltan Varga 2013-12-05 15:34:44 UTC
So:
Doing a step over from the last line of the DefaultRequestHeaders accessor skips over the UserAgent and ParseAdd calls.
Comment 2 Zoltan Varga 2013-12-06 16:31:54 UTC
So we don't stop in the the end of the get_DefaultRequestHeaders method because it only has one seq point:

    <method token="0x6000014" signature="System.Net.Http.Headers.HttpRequestHeaders System.Net.Http.HttpClient::get_DefaultRequestHeaders()">
      <sequencepoints>
        <entry il="0x0" row="76" col="5" file_ref="7" />
      </sequencepoints>
      <locals />
      <scopes />
    </method>

and we don't stop before the UserAgent call, because the IL stack is not empty, and we don't stop there doing step overs, so we can step over nested calls.
Comment 3 Rodrigo Kumpera 2014-01-09 15:17:18 UTC
This looks like a compiler bug, Marek?
Comment 4 Marek Safar 2014-01-10 08:34:34 UTC
It's not compiler bug. You need to build mono with --disable-bcl-opt to have precise sequence points but even with that it still does not work.
Comment 5 Rodrigo Kumpera 2014-01-10 10:16:51 UTC
How come? It's missing a seqpoint at a non obvious place. How could sdb figure out where to stop?
Comment 6 Marek Safar 2014-01-10 10:19:15 UTC
It's not missing anything if you compile BCL with debugging support (otherwise there is no sequence point at closing "}" but that's expected).
Comment 7 Zoltan Varga 2015-01-07 11:51:39 UTC
This works now.