aboutsummaryrefslogtreecommitdiff
path: root/std/debug.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-04-03 04:58:19 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-04-03 05:04:46 -0400
commitc400cb429abf2980962739731f5b64861a54ab61 (patch)
treeafb244401d3aa18547ea7e6a5bf5fbe141472cee /std/debug.zig
parenta1363b52278b68f59aa72adf985f11e6c1d02cf9 (diff)
downloadzig-c400cb429abf2980962739731f5b64861a54ab61.tar.gz
zig-c400cb429abf2980962739731f5b64861a54ab61.zip
zig build system: add setLinkerScript and setTarget
* See #204 - zig build system * allow builtin types Os, Environ, Arch to be used at runtime. they have zero_bits=false and debug info now. * Eradicate use of `@alloca` in std for syscalls. See #225 * add `std.io.writeFile` * `std.debug.panic` adds a newline to format
Diffstat (limited to 'std/debug.zig')
-rw-r--r--std/debug.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/std/debug.zig b/std/debug.zig
index 7112ad0da2..40775eba8d 100644
--- a/std/debug.zig
+++ b/std/debug.zig
@@ -28,7 +28,7 @@ pub coldcc fn panic(comptime format: []const u8, args: ...) -> noreturn {
panicking = true;
}
- %%io.stderr.printf(format, args);
+ %%io.stderr.printf(format ++ "\n", args);
%%printStackTrace();
os.abort();
@@ -52,8 +52,8 @@ pub fn writeStackTrace(out_stream: &io.OutStream) -> %void {
.compile_unit_list = List(CompileUnit).init(&global_allocator),
};
const st = &stack_trace;
- %return io.openSelfExe(&st.self_exe_stream);
- defer st.self_exe_stream.close() %% {};
+ st.self_exe_stream = %return io.openSelfExe();
+ defer st.self_exe_stream.close();
%return st.elf.openStream(&global_allocator, &st.self_exe_stream);
defer st.elf.close();