| ... | ... | @@ -61,28 +61,12 @@ pub const cpu_context = @import("debug/cpu_context.zig"); |
| 61 | 61 | /// ``` |
| 62 | 62 | pub const SelfInfo = if (@hasDecl(root, "debug") and @hasDecl(root.debug, "SelfInfo")) |
| 63 | 63 | root.debug.SelfInfo |
| 64 | | else switch (native_os) { |
| 65 | | .linux, |
| 66 | | .netbsd, |
| 67 | | .freebsd, |
| 68 | | .dragonfly, |
| 69 | | .openbsd, |
| 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, |
| 64 | else switch (std.Target.ObjectFormat.default(native_os, native_arch)) { |
| 65 | .coff => @import("debug/SelfInfo/Windows.zig"), |
| 66 | .elf => @import("debug/SelfInfo/Elf.zig"), |
| 67 | .macho => @import("debug/SelfInfo/Darwin.zig"), |
| 68 | .goff, .plan9, .spirv, .wasm, .xcoff => void, |
| 69 | .c, .hex, .raw => unreachable, |
| 86 | 70 | }; |
| 87 | 71 | |
| 88 | 72 | pub const SelfInfoError = error{ |