Add simple stacktrace logging

This commit is contained in:
Sam Tebbs 2019-11-02 02:18:02 +00:00
parent 9d52e08ea7
commit f0161f0ec9
10 changed files with 477 additions and 14 deletions

View file

@ -1,7 +1,13 @@
const builtin = @import("builtin");
const std = @import("std");
const MemProfile = @import("mem_mock.zig").MemProfile;
pub fn panic(trace: ?*builtin.StackTrace, comptime format: []const u8, args: ...) noreturn {
@setCold(true);
std.debug.panic(format, args);
}
pub fn init(mem_profile: *const MemProfile, allocator: *std.mem.Allocator) !void {
// This is never run so just return an arbitrary error to satisfy the compiler
return error.NotNeeded;
}