aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug.zig
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/debug.zig')
-rw-r--r--lib/std/debug.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig
index a7f0b202cb..cfe646647b 100644
--- a/lib/std/debug.zig
+++ b/lib/std/debug.zig
@@ -284,13 +284,14 @@ pub fn assert(ok: bool) void {
pub fn panic(comptime format: []const u8, args: anytype) noreturn {
@setCold(true);
- panicExtra(null, format, args);
+ panicExtra(null, null, format, args);
}
/// `panicExtra` is useful when you want to print out an `@errorReturnTrace`
/// and also print out some values.
pub fn panicExtra(
trace: ?*std.builtin.StackTrace,
+ ret_addr: ?usize,
comptime format: []const u8,
args: anytype,
) noreturn {
@@ -308,7 +309,7 @@ pub fn panicExtra(
break :blk &buf;
},
};
- std.builtin.panic(msg, trace);
+ std.builtin.panic(msg, trace, ret_addr);
}
/// Non-zero whenever the program triggered a panic.