From f21a78b5a31b13d5b6bb84c23c4a35e64402d0e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Tue, 14 Oct 2025 23:18:20 +0200 Subject: [PATCH] std.debug.SelfInfo.Elf: don't support DWARF unwinding for Hexagon and PowerPC As for SPARC, FP-based unwinding is superior on these. --- lib/std/debug/SelfInfo/Elf.zig | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/lib/std/debug/SelfInfo/Elf.zig b/lib/std/debug/SelfInfo/Elf.zig index f10dc3cd63..bee04a5eef 100644 --- a/lib/std/debug/SelfInfo/Elf.zig +++ b/lib/std/debug/SelfInfo/Elf.zig @@ -94,28 +94,22 @@ pub const can_unwind: bool = s: { // Notably, we are yet to support unwinding on ARM. There, unwinding is not done through // `.eh_frame`, but instead with the `.ARM.exidx` section, which has a different format. const archs: []const std.Target.Cpu.Arch = switch (builtin.target.os.tag) { - // Not supported yet: arm, m68k, sparc64 + // Not supported yet: arm, m68k .haiku => &.{ .aarch64, - .powerpc, .riscv64, .x86, .x86_64, }, - // Not supported yet: arc, arm/armeb/thumb/thumbeb, csky, m68k, or1k, sparc/sparc64, xtensa + // Not supported yet: arc, arm/armeb/thumb/thumbeb, csky, m68k, or1k, xtensa .linux => &.{ .aarch64, .aarch64_be, - .hexagon, .loongarch64, .mips, .mipsel, .mips64, .mips64el, - .powerpc, - .powerpcle, - .powerpc64, - .powerpc64le, .riscv32, .riscv64, .s390x, @@ -134,28 +128,23 @@ pub const can_unwind: bool = s: { // Not supported yet: arm .freebsd => &.{ .aarch64, - .powerpc64, - .powerpc64le, .riscv64, .x86_64, }, - // Not supported yet: arm/armeb, m68k, mips64/mips64el, sparc/sparc64 + // Not supported yet: arm/armeb, m68k, mips64/mips64el .netbsd => &.{ .aarch64, .aarch64_be, .mips, .mipsel, - .powerpc, .x86, .x86_64, }, - // Not supported yet: arm, sparc64 + // Not supported yet: arm .openbsd => &.{ .aarch64, .mips64, .mips64el, - .powerpc, - .powerpc64, .riscv64, .x86, .x86_64, @@ -165,7 +154,6 @@ pub const can_unwind: bool = s: { .x86, .x86_64, }, - // Not supported yet: sparc64 .solaris => &.{ .x86_64, },