Fixing debugger hang that would occur when inspecting a field that ha… (#40455)
authormonojenkins <jo.shields+jenkins@xamarin.com>
Mon, 10 Aug 2020 21:18:13 +0000 (17:18 -0400)
committerGitHub <noreply@github.com>
Mon, 10 Aug 2020 21:18:13 +0000 (18:18 -0300)
…s a Debugger.Break in it's accessor.

fixes mono/mono#20209

<!--
Thank you for your Pull Request!

If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.

Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->

Co-authored-by: UnityAlex <UnityAlex@users.noreply.github.com>
src/mono/mono/mini/debugger-agent.c

index 5b6d729..7803326 100644 (file)
@@ -4027,6 +4027,9 @@ process_event (EventKind event, gpointer arg, gint32 il_offset, MonoContext *ctx
                        DebuggerTlsData *tls;
                        tls = (DebuggerTlsData *)mono_native_tls_get_value (debugger_tls_id);
                        g_assert (tls);
+                       // We are already processing a breakpoint event
+                       if (tls->disable_breakpoints)
+                               return;
                        mono_stopwatch_stop (&tls->step_time);
                        break;
                }