aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorkcbanner <kcbanner@gmail.com>2023-01-08 23:51:55 -0500
committerkcbanner <kcbanner@gmail.com>2023-01-08 23:51:55 -0500
commit58e558822a2980bcaf29ce2a07474093702cabc6 (patch)
treee1a460ff1373d016949d0902a066746421dabb2c /lib/std
parent5e3cadf871ab800d90c85f39cc28b922539d4dbf (diff)
downloadzig-58e558822a2980bcaf29ce2a07474093702cabc6.tar.gz
zig-58e558822a2980bcaf29ce2a07474093702cabc6.zip
windows: unexpectedStatus/unexpectedError start the stack trace at the caller
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/os/windows.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig
index 29dda9e8aa..b38a7f73a7 100644
--- a/lib/std/os/windows.zig
+++ b/lib/std/os/windows.zig
@@ -2077,7 +2077,7 @@ pub fn unexpectedError(err: Win32Error) std.os.UnexpectedError {
);
_ = std.unicode.utf16leToUtf8(&buf_utf8, buf_wstr[0..len]) catch unreachable;
std.debug.print("error.Unexpected: GetLastError({}): {s}\n", .{ @enumToInt(err), buf_utf8[0..len] });
- std.debug.dumpCurrentStackTrace(null);
+ std.debug.dumpCurrentStackTrace(@returnAddress());
}
return error.Unexpected;
}
@@ -2091,7 +2091,7 @@ pub fn unexpectedWSAError(err: ws2_32.WinsockError) std.os.UnexpectedError {
pub fn unexpectedStatus(status: NTSTATUS) std.os.UnexpectedError {
if (std.os.unexpected_error_tracing) {
std.debug.print("error.Unexpected NTSTATUS=0x{x}\n", .{@enumToInt(status)});
- std.debug.dumpCurrentStackTrace(null);
+ std.debug.dumpCurrentStackTrace(@returnAddress());
}
return error.Unexpected;
}