diff --git a/src/mono/mono/mini/mini-exceptions.c b/src/mono/mono/mini/mini-exceptions.c index aae31d68a1cb7..b1ea49091f80d 100644 --- a/src/mono/mono/mini/mini-exceptions.c +++ b/src/mono/mono/mini/mini-exceptions.c @@ -3435,7 +3435,11 @@ mono_print_thread_dump_internal (void *sigctx, MonoContext *start_ctx) mono_walk_stack_with_ctx (print_stack_frame_to_string, &ctx, MONO_UNWIND_LOOKUP_ALL, text); +#if HOST_WASM + mono_runtime_printf_err ("%s", text->str); //to print the native callstack +#else mono_runtime_printf ("%s", text->str); +#endif #if HOST_WIN32 && TARGET_WIN32 && _DEBUG OutputDebugStringA(text->str);