| ... | @@ -377,7 +377,7 @@ pub fn dumpStackTrace(stack_trace: std.builtin.StackTrace) void { | ... | @@ -377,7 +377,7 @@ pub fn dumpStackTrace(stack_trace: std.builtin.StackTrace) void { |
| 377 | stderr.print("Unable to dump stack trace: Unable to open debug info: {s}\n", .{@errorName(err)}) catch return; | 377 | stderr.print("Unable to dump stack trace: Unable to open debug info: {s}\n", .{@errorName(err)}) catch return; |
| 378 | return; | 378 | return; |
| 379 | }; | 379 | }; |
| 380 | writeStackTrace(stack_trace, stderr, getDebugInfoAllocator(), debug_info, io.tty.detectConfig(io.getStdErr())) catch |err| { | 380 | writeStackTrace(stack_trace, stderr, debug_info, io.tty.detectConfig(io.getStdErr())) catch |err| { |
| 381 | stderr.print("Unable to dump stack trace: {s}\n", .{@errorName(err)}) catch return; | 381 | stderr.print("Unable to dump stack trace: {s}\n", .{@errorName(err)}) catch return; |
| 382 | return; | 382 | return; |
| 383 | }; | 383 | }; |
| ... | @@ -520,11 +520,9 @@ fn waitForOtherThreadToFinishPanicking() void { | ... | @@ -520,11 +520,9 @@ fn waitForOtherThreadToFinishPanicking() void { |
| 520 | pub fn writeStackTrace( | 520 | pub fn writeStackTrace( |
| 521 | stack_trace: std.builtin.StackTrace, | 521 | stack_trace: std.builtin.StackTrace, |
| 522 | out_stream: anytype, | 522 | out_stream: anytype, |
| 523 | allocator: mem.Allocator, | | |
| 524 | debug_info: *SelfInfo, | 523 | debug_info: *SelfInfo, |
| 525 | tty_config: io.tty.Config, | 524 | tty_config: io.tty.Config, |
| 526 | ) !void { | 525 | ) !void { |
| 527 | _ = allocator; | | |
| 528 | if (builtin.strip_debug_info) return error.MissingDebugInfo; | 526 | if (builtin.strip_debug_info) return error.MissingDebugInfo; |
| 529 | var frame_index: usize = 0; | 527 | var frame_index: usize = 0; |
| 530 | var frames_left: usize = @min(stack_trace.index, stack_trace.instruction_addresses.len); | 528 | var frames_left: usize = @min(stack_trace.index, stack_trace.instruction_addresses.len); |
| ... | @@ -1452,7 +1450,7 @@ pub fn ConfigurableTrace(comptime size: usize, comptime stack_frame_count: usize | ... | @@ -1452,7 +1450,7 @@ pub fn ConfigurableTrace(comptime size: usize, comptime stack_frame_count: usize |
| 1452 | .index = frames.len, | 1450 | .index = frames.len, |
| 1453 | .instruction_addresses = frames, | 1451 | .instruction_addresses = frames, |
| 1454 | }; | 1452 | }; |
| 1455 | writeStackTrace(stack_trace, stderr, getDebugInfoAllocator(), debug_info, tty_config) catch continue; | 1453 | writeStackTrace(stack_trace, stderr, debug_info, tty_config) catch continue; |
| 1456 | } | 1454 | } |
| 1457 | if (t.index > end) { | 1455 | if (t.index > end) { |
| 1458 | stderr.print("{d} more traces not shown; consider increasing trace size\n", .{ | 1456 | stderr.print("{d} more traces not shown; consider increasing trace size\n", .{ |