From 6855d9b168de09ae680301d22fb33362114d2aca Mon Sep 17 00:00:00 2001 From: thaystg Date: Thu, 5 Nov 2020 15:39:25 +0000 Subject: [PATCH] [wasm][debugger] Implementing support to Debugger::Break. Fixes dotnet/runtime#44210 --- mono/mini/mini-wasm-debugger.c | 7 +++++++ mono/mini/mini-wasm.h | 1 + 2 files changed, 8 insertions(+) diff --git a/mono/mini/mini-wasm-debugger.c b/mono/mini/mini-wasm-debugger.c index 15951e1b7076..9ac0eb602d92 100644 --- a/mono/mini/mini-wasm-debugger.c +++ b/mono/mini/mini-wasm-debugger.c @@ -444,6 +444,7 @@ mono_wasm_debugger_init (void) objrefs = g_hash_table_new_full (NULL, NULL, NULL, mono_debugger_free_objref); mini_get_dbg_callbacks ()->handle_exception = handle_exception; + mini_get_dbg_callbacks ()->user_break = mono_wasm_user_break; } MONO_API void @@ -663,6 +664,12 @@ mono_wasm_breakpoint_hit (void) // mono_wasm_fire_bp (); } +void +mono_wasm_user_break (void) +{ + mono_wasm_fire_bp (); +} + EMSCRIPTEN_KEEPALIVE int mono_wasm_current_bp_id (void) { diff --git a/mono/mini/mini-wasm.h b/mono/mini/mini-wasm.h index ac35ed3df33c..26a97ffbd8bf 100644 --- a/mono/mini/mini-wasm.h +++ b/mono/mini/mini-wasm.h @@ -111,6 +111,7 @@ void mono_wasm_set_timeout (int timeout, int id); void mono_wasm_single_step_hit (void); void mono_wasm_breakpoint_hit (void); +void mono_wasm_user_break (void); int mono_wasm_assembly_already_added (const char *assembly_name);