| ... | @@ -61,28 +61,12 @@ pub const cpu_context = @import("debug/cpu_context.zig"); | ... | @@ -61,28 +61,12 @@ pub const cpu_context = @import("debug/cpu_context.zig"); |
| 61 | /// ``` | 61 | /// ``` |
| 62 | pub const SelfInfo = if (@hasDecl(root, "debug") and @hasDecl(root.debug, "SelfInfo")) | 62 | pub const SelfInfo = if (@hasDecl(root, "debug") and @hasDecl(root.debug, "SelfInfo")) |
| 63 | root.debug.SelfInfo | 63 | root.debug.SelfInfo |
| 64 | else switch (native_os) { | 64 | else switch (std.Target.ObjectFormat.default(native_os, native_arch)) { |
| 65 | .linux, | 65 | .coff => @import("debug/SelfInfo/Windows.zig"), |
| 66 | .netbsd, | 66 | .elf => @import("debug/SelfInfo/Elf.zig"), |
| 67 | .freebsd, | 67 | .macho => @import("debug/SelfInfo/Darwin.zig"), |
| 68 | .dragonfly, | 68 | .goff, .plan9, .spirv, .wasm, .xcoff => void, |
| 69 | .openbsd, | 69 | .c, .hex, .raw => unreachable, |
| 70 | .solaris, | | |
| 71 | .illumos, | | |
| 72 | => @import("debug/SelfInfo/Elf.zig"), | | |
| 73 | | | |
| 74 | .macos, | | |
| 75 | .ios, | | |
| 76 | .watchos, | | |
| 77 | .tvos, | | |
| 78 | .visionos, | | |
| 79 | => @import("debug/SelfInfo/Darwin.zig"), | | |
| 80 | | | |
| 81 | .uefi, | | |
| 82 | .windows, | | |
| 83 | => @import("debug/SelfInfo/Windows.zig"), | | |
| 84 | | | |
| 85 | else => void, | | |
| 86 | }; | 70 | }; |
| 87 | | 71 | |
| 88 | pub const SelfInfoError = error{ | 72 | pub const SelfInfoError = error{ |