Description
Missing DEBUG_EXCEPTION_CATCH_HANDLER_FOUND events for exceptions during func eval.
Same scenario as described in #102178. Looks like the regression was introduced in #119784, specifically this change:
When SfiNext reached native marker state, it was doing one more unwind to get to the frame function state. That is benign for non-interpreter scenarios, as it doesn't change the regdisplay, but it is useless due to that. But for interpreter, it can actually incorrectly move to interpreted code. The fix is to not to do that unwind and just return.
Reproduction Steps
- Create the following program targeting .NET 11 Preview 2
- Set a breakpoint on the specified line
- Evaluate
Divide(5, 0) in the debugger. If using Visual Studio, use the immediate Window so that the debugger will stop on the exception
using System.Diagnostics;
static class Program
{
static int Divide(int n, int m)
{
return n / m;
}
static void Main(string[] args)
{
Console.WriteLine("10/2 = {0}", Divide(10, 2)); // breakpoint here
}
};
Expected behavior
The debugger should raise an exception callback with DEBUG_EXCEPTION_CATCH_HANDLER_FOUND. In Visual Studio, if evaluating from the immediate Window, this will cause the debugger to break on the exception.
Actual behavior
No catch-handler-found event is raised
Regression?
Regression from .NET 10.
Known Workarounds
None
Configuration
All configs
Other information
No response
Description
Missing DEBUG_EXCEPTION_CATCH_HANDLER_FOUND events for exceptions during func eval.
Same scenario as described in #102178. Looks like the regression was introduced in #119784, specifically this change:
Reproduction Steps
Divide(5, 0)in the debugger. If using Visual Studio, use the immediate Window so that the debugger will stop on the exceptionExpected behavior
The debugger should raise an exception callback with
DEBUG_EXCEPTION_CATCH_HANDLER_FOUND. In Visual Studio, if evaluating from the immediate Window, this will cause the debugger to break on the exception.Actual behavior
No catch-handler-found event is raised
Regression?
Regression from .NET 10.
Known Workarounds
None
Configuration
All configs
Other information
No response