authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-10-10 20:34:12-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-10-10 20:34:12-04:00
log717e791db2c49c46a913c574946e9f410a6d9168
tree9a58d938bb574a0adcb5b4f1235580b41fcc2be7
parent1f28d641c054b8abd3eca914df6dde3ee7866ea3

better abort() implementation for windows

in debug mode, it spawns the debugger

1 files changed, 4 insertions(+), 1 deletions(-)

std/os/index.zig+4-1
...@@ -109,7 +109,10 @@ pub coldcc fn abort() -> noreturn {...@@ -109,7 +109,10 @@ pub coldcc fn abort() -> noreturn {
109 while (true) {}109 while (true) {}
110 },110 },
111 Os.windows => {111 Os.windows => {
112 windows.ExitProcess(1);112 if (builtin.mode == builtin.Mode.Debug) {
113 @breakpoint();
114 }
115 windows.ExitProcess(3);
113 },116 },
114 else => @compileError("Unsupported OS"),117 else => @compileError("Unsupported OS"),
115 }118 }