diff options
| author | Maya Rashish <maya@NetBSD.org> | 2019-02-16 12:29:12 +0200 |
|---|---|---|
| committer | Maya Rashish <maya@NetBSD.org> | 2019-02-17 09:17:34 +0200 |
| commit | bc10382ec1b87da16943907ba2d0fbd267af07f0 (patch) | |
| tree | 1bc117549f49266c2d1244d0f1cc7220e201b86b /std/debug/index.zig | |
| parent | ba56f365c813440b79c1710c6a8b0fd591883e13 (diff) | |
| download | zig-bc10382ec1b87da16943907ba2d0fbd267af07f0.tar.gz zig-bc10382ec1b87da16943907ba2d0fbd267af07f0.zip | |
Add NetBSD support
Mostly picking the same paths as FreeBSD.
We need a little special handling for crt files, as netbsd uses its
own (and not GCC's) for those, with slightly different names.
Diffstat (limited to 'std/debug/index.zig')
| -rw-r--r-- | std/debug/index.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/std/debug/index.zig b/std/debug/index.zig index 7e5be9acef..b8ea7e7f84 100644 --- a/std/debug/index.zig +++ b/std/debug/index.zig @@ -240,7 +240,7 @@ pub fn writeCurrentStackTraceWindows( pub fn printSourceAtAddress(debug_info: *DebugInfo, out_stream: var, address: usize, tty_color: bool) !void { switch (builtin.os) { builtin.Os.macosx => return printSourceAtAddressMacOs(debug_info, out_stream, address, tty_color), - builtin.Os.linux, builtin.Os.freebsd => return printSourceAtAddressLinux(debug_info, out_stream, address, tty_color), + builtin.Os.linux, builtin.Os.freebsd, builtin.Os.netbsd => return printSourceAtAddressLinux(debug_info, out_stream, address, tty_color), builtin.Os.windows => return printSourceAtAddressWindows(debug_info, out_stream, address, tty_color), else => return error.UnsupportedOperatingSystem, } @@ -717,7 +717,7 @@ pub const OpenSelfDebugInfoError = error{ pub fn openSelfDebugInfo(allocator: *mem.Allocator) !DebugInfo { switch (builtin.os) { - builtin.Os.linux, builtin.Os.freebsd => return openSelfDebugInfoLinux(allocator), + builtin.Os.linux, builtin.Os.freebsd, builtin.Os.netbsd => return openSelfDebugInfoLinux(allocator), builtin.Os.macosx, builtin.Os.ios => return openSelfDebugInfoMacOs(allocator), builtin.Os.windows => return openSelfDebugInfoWindows(allocator), else => return error.UnsupportedOperatingSystem, @@ -1141,7 +1141,7 @@ pub const DebugInfo = switch (builtin.os) { sect_contribs: []pdb.SectionContribEntry, modules: []Module, }, - builtin.Os.linux, builtin.Os.freebsd => DwarfInfo, + builtin.Os.linux, builtin.Os.freebsd, builtin.Os.netbsd => DwarfInfo, else => @compileError("Unsupported OS"), }; |
