Repository navigation
[clr-interp][debugger] Skip ResumeInUpdatedFunction for Interpreter - #130069
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @BrzVlad, @janvorli, @kg |
There was a problem hiding this comment.
Pull request overview
This PR changes Edit-and-Continue (EnC) remap behavior in the CoreCLR debugger controller so that when the current instruction pointer is in interpreted code (under FEATURE_INTERPRETER), the runtime does not call ResumeInUpdatedFunction, allowing execution to continue in the pre-update version of the method.
Changes:
- Detect interpreted-code execution at remap time via
EECodeInfo(GetIP(pContext)).IsInterpretedCode(). - Skip
g_pEEInterface->ResumeInUpdatedFunction(...)for interpreted code and log that the remap is being skipped. - Keep existing remap behavior for non-interpreted (JIT/native) code.
Comments suppressed due to low confidence (1)
src/coreclr/debug/ee/controller.cpp:9495
- This log message is now reachable when remap is skipped for interpreted code, but it claims we returned from ResumeInUpdatedFunction. That’s misleading and makes EnC/interpreter debugging harder to diagnose from logs. Consider changing it to describe what actually happened (skipping the EnC patch / remap).
LOG((LF_CORDB, LL_ALWAYS, "DEnCB::TP: We've returned from ResumeInUpdatedFunction"
"we're going to skip the EnC patchId:0x%zx\n", patch->patchId));
|
When the EnC path is disabled, are we calling the UpdateModuleSymbols callback when? |
I don't think It is triggered by |
Thank you @noahfalk , yes I think that preventing the EnC breakpoints is a better way. I wasn't aware that VS would have an issue with this. Updated the PR and tested with Maui iOS app. |
fwiw I don't know that VS would have necessarily run into issues, I was more thinking that its confusing for the API to offer remap opportunities that it has no ability to fulfill :) |
…130069) We currently do not support EnC when debugging code from CoreCLR interpreter. By skipping the `ResumeInUpdatedFunction` we allow the changes to take place on subsequent method execution.
We currently do not support EnC when debugging code from CoreCLR interpreter. By skipping the
ResumeInUpdatedFunctionwe allow the changes to take place on subsequent method execution.