Skip to content

Commit 2e27184

Browse files
committed
debug.zig: use Windows APIs on .windows codepath
1 parent 7c09f3c commit 2e27184

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/std/debug.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -973,8 +973,8 @@ pub fn writeCurrentStackTrace(
973973
start_addr: ?usize,
974974
) !void {
975975
if (native_os == .windows) {
976-
var context: ThreadContext = undefined;
977-
assert(getContext(&context));
976+
var context: windows.CONTEXT = std.mem.zeroes(windows.CONTEXT);
977+
windows.ntdll.RtlCaptureContext(&context);
978978
return writeStackTraceWindows(out_stream, debug_info, tty_config, &context, start_addr);
979979
}
980980
var context: ThreadContext = undefined;

0 commit comments

Comments
 (0)