[debugger] Debugger doesn't break on unhandled exceptions (mono/mono#15234)
authorThays Grazia <thaystg@gmail.com>
Thu, 20 Jun 2019 22:48:13 +0000 (19:48 -0300)
committerZoltan Varga <vargaz@gmail.com>
Thu, 20 Jun 2019 22:48:13 +0000 (18:48 -0400)
commitc21120489de25f6dfbd7c8976fc1e273c7f0cd3f
treee2fdb0af262eab9c9a6eb66958676ea14796cf91
parent671cb00b9601de4056108c7018a21ddb6882b67b
[debugger] Debugger doesn't break on unhandled exceptions  (mono/mono#15234)

* When the catch found is in a MONO_WRAPPER_RUNTIME_INVOKE the exception should be treated as an UNHANDLED by the debugger.

* Adding unit test.

* trying to fix side effect.

* I've tested the MonoTests.DebuggerTests.UnhandledException_2 test on VsWin using .net Framework and I think the test is wrong because the first break is in throw and the next break will be on breakpoint.
In our implementation we were ignoring the unhandled exception and stopping only on breakpoint.

Commit migrated from https://github.com/mono/mono/commit/405d521149b8fe4caef2eaa3665e5f6020ef298b
src/mono/mono/mini/mini-exceptions.c