Skip to content

Commit

Permalink
better abort() implementation for windows
Browse files Browse the repository at this point in the history
in debug mode, it spawns the debugger
andrewrk committed Oct 11, 2017
1 parent 1f28d64 commit 717e791
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion std/os/index.zig
Original file line number Diff line number Diff line change
@@ -109,7 +109,10 @@ pub coldcc fn abort() -> noreturn {
while (true) {}
},
Os.windows => {
windows.ExitProcess(1);
if (builtin.mode == builtin.Mode.Debug) {
@breakpoint();
}
windows.ExitProcess(3);
},
else => @compileError("Unsupported OS"),
}

0 comments on commit 717e791

Please sign in to comment.