New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source line breakpoints stop working when tiered jitting replaces the code #14423

Closed
noahfalk opened this Issue Oct 11, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@noahfalk
Member

noahfalk commented Oct 11, 2017

If you set a breakpoint in your source code and then execute that code over and over, eventually (after 30+ iterations currently) the breakpoint will stop triggering. What occurs is that the tiered compilation feature replaced the original jitted code with the breakpoint with new code, and the new code has no breakpoint. That in turn occurs because the JITComplete callback only triggers for the first jitting of a method, but doesn't trigger for subsequent jittings:

https://github.com/dotnet/coreclr/blob/master/src/vm/jitinterface.cpp#L12096

In order to place breakpoints in all jitted versions of the method, the debugging layer must be informed that these new versions exist.

@noahfalk noahfalk self-assigned this Oct 11, 2017

noahfalk added a commit to noahfalk/coreclr that referenced this issue Oct 11, 2017

Fix dotnet#14423
The JIT now invokes the debugger's JITComplete callback on every jitting of a method

noahfalk added a commit to noahfalk/coreclr that referenced this issue Oct 11, 2017

Fix dotnet#14423
The JIT now invokes the debugger's JITComplete callback on every jitting of a method

noahfalk added a commit to noahfalk/coreclr that referenced this issue Oct 11, 2017

Fix dotnet#14423
The JIT now invokes the debugger's JITComplete callback on every jitting of a method

@noahfalk noahfalk closed this in 079f9b7 Oct 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment