progress toward hello world without libc in windows

This commit is contained in:
Andrew Kelley
2017-06-04 10:08:55 -04:00
parent e5b90651ba
commit 199bbb6292
11 changed files with 2727 additions and 134 deletions

View File

@@ -30,14 +30,14 @@ pub coldcc fn panic(comptime format: []const u8, args: ...) -> noreturn {
}
%%io.stderr.printf(format ++ "\n", args);
%%writeStackTrace(&io.stderr, &global_allocator, io.stderr.isTty(), 1);
%%writeStackTrace(&io.stderr, &global_allocator, io.stderr.isTty() %% false, 1);
%%io.stderr.flush();
os.abort();
}
pub fn printStackTrace() -> %void {
%return writeStackTrace(&io.stderr, &global_allocator, io.stderr.isTty(), 1);
%return writeStackTrace(&io.stderr, &global_allocator, io.stderr.isTty() %% false, 1);
%return io.stderr.flush();
}
@@ -48,6 +48,9 @@ const RESET = "\x1b[0m";
pub var user_main_fn: ?fn() -> %void = null;
error PathNotFound;
error InvalidDebugInfo;
pub fn writeStackTrace(out_stream: &io.OutStream, allocator: &mem.Allocator, tty_color: bool,
ignore_frame_count: usize) -> %void
{