[debugger] Implementing step through multithreaded code. (#33062)
authormonojenkins <jo.shields+jenkins@xamarin.com>
Tue, 24 Mar 2020 21:25:10 +0000 (17:25 -0400)
committerGitHub <noreply@github.com>
Tue, 24 Mar 2020 21:25:10 +0000 (18:25 -0300)
commitdcfce2e0af6614ee124590b75a7027d0efdb2e31
treee506391495ca23efc40e079c951a7536379129c4
parent52086331e748a562f7790099812341d37bf91dad
[debugger] Implementing step through multithreaded code. (#33062)

* Implementing step through multithreaded code.

* Fixing concurrency in the case that more than one thread will run the same code, then when the jit is finished, the thread which jitted the code calls jit_done and the others that were waiting don't call, in this case, the other threads can run before the thread which is calling the jit_done set the breakpoint, so the other threads will not stop in the breakpoint.
As I understood we don't need to check if the try_suspend_runtime is returning false or true when we  hit a breakpoint from context, so removed the call.

Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
src/mono/mono/mini/debugger-agent.c
src/mono/mono/mini/debugger-engine.c
src/mono/mono/mini/debugger-engine.h
src/mono/mono/mini/mini-runtime.c
src/mono/mono/mini/mini-wasm-debugger.c