progress toward hello world without libc in windows
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user