authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-10-01 04:31:47+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-10-01 23:47:47+02:00
log59633e54a235ce8811cfb33d719595e1bd6f7334
treee62f367ab94e12bef70f20fa316ef829c83da151
parent2cdafe91065c5d477563361a8fe1f637898ca285
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.debug: select SelfInfo using ObjectFormat.default()


1 files changed, 6 insertions(+), 22 deletions(-)

lib/std/debug.zig+6-22
...@@ -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/// ```
62pub const SelfInfo = if (@hasDecl(root, "debug") and @hasDecl(root.debug, "SelfInfo"))62pub const SelfInfo = if (@hasDecl(root, "debug") and @hasDecl(root.debug, "SelfInfo"))
63 root.debug.SelfInfo63 root.debug.SelfInfo
64else switch (native_os) {64else 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};
8771
88pub const SelfInfoError = error{72pub const SelfInfoError = error{