File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -421,7 +421,13 @@ const Panic = struct {
421421 );
422422 }
423423 if (@errorReturnTrace ()) | t | dumpStackTrace (t .* );
424- dumpCurrentStackTrace (first_trace_addr );
424+ if (is_zig_014_or_less ) {
425+ dumpCurrentStackTrace_014 (first_trace_addr );
426+ } else {
427+ const stderr = io .lockAndroidLogWriter ();
428+ defer io .unlockAndroidLogWriter ();
429+ std .debug .dumpCurrentStackTraceToWriter (first_trace_addr orelse @returnAddress (), stderr ) catch {};
430+ }
425431 }
426432
427433 waitForOtherThreadToFinishPanicking ();
@@ -463,7 +469,8 @@ const Panic = struct {
463469 }
464470 }
465471
466- fn dumpCurrentStackTrace (start_addr : ? usize ) void {
472+ /// Deprecated: Only used for current Zig 0.14.1 stable builds,
473+ fn dumpCurrentStackTrace_014 (start_addr : ? usize ) void {
467474 nosuspend {
468475 if (comptime builtin .target .cpu .arch .isWasm ()) {
469476 @compileError ("cannot use Android logger with Wasm" );
You can’t perform that action at this time.
0 commit comments