| ... | @@ -732,7 +732,15 @@ pub fn dumpCurrentStackTrace(options: StackUnwindOptions) void { | ... | @@ -732,7 +732,15 @@ pub fn dumpCurrentStackTrace(options: StackUnwindOptions) void { |
| 732 | const tty_config = tty.detectConfig(.stderr()); | 732 | const tty_config = tty.detectConfig(.stderr()); |
| 733 | const stderr = lockStderrWriter(&.{}); | 733 | const stderr = lockStderrWriter(&.{}); |
| 734 | defer unlockStderrWriter(); | 734 | defer unlockStderrWriter(); |
| 735 | writeCurrentStackTrace(options, stderr, tty_config) catch |err| switch (err) { | 735 | writeCurrentStackTrace(.{ |
| | 736 | .first_address = a: { |
| | 737 | if (options.first_address) |a| break :a a; |
| | 738 | if (options.context != null) break :a null; |
| | 739 | break :a @returnAddress(); // don't include this frame in the trace |
| | 740 | }, |
| | 741 | .context = options.context, |
| | 742 | .allow_unsafe_unwind = options.allow_unsafe_unwind, |
| | 743 | }, stderr, tty_config) catch |err| switch (err) { |
| 736 | error.WriteFailed => {}, | 744 | error.WriteFailed => {}, |
| 737 | }; | 745 | }; |
| 738 | } | 746 | } |