From: Larry Ewing Date: Thu, 6 Aug 2020 18:19:59 +0000 (-0500) Subject: Re-enable debug_levels less than zero to indicate debugging without debug logging... X-Git-Tag: submit/tizen/20210909.063632~6180 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c5ca43e49a8c1f762ff0c82078bae701df8ea3d8;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Re-enable debug_levels less than zero to indicate debugging without debug logging (#40458) --- diff --git a/src/mono/wasm/runtime/driver.c b/src/mono/wasm/runtime/driver.c index 971cd57..3fc1a7e 100644 --- a/src/mono/wasm/runtime/driver.c +++ b/src/mono/wasm/runtime/driver.c @@ -358,7 +358,7 @@ void mono_initialize_internals () } EMSCRIPTEN_KEEPALIVE void -mono_wasm_load_runtime (const char *unused, int enable_debugging) +mono_wasm_load_runtime (const char *unused, int debug_level) { const char *interp_opts = ""; @@ -386,10 +386,18 @@ mono_wasm_load_runtime (const char *unused, int enable_debugging) #endif #else mono_jit_set_aot_mode (MONO_AOT_MODE_INTERP_ONLY); - if (enable_debugging > 0) { + + /* + * debug_level > 0 enables debugging and sets the debug log level to debug_level + * debug_level == 0 disables debugging and enables interpreter optimizations + * debug_level < 0 enabled debugging and disables debug logging. + * + * Note: when debugging is enabled interpreter optimizations are disabled. + */ + if (debug_level) { // Disable optimizations which interfere with debugging interp_opts = "-all"; - mono_wasm_enable_debugging (enable_debugging); + mono_wasm_enable_debugging (debug_level); } #endif