authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-10-14 23:18:20+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-10-15 13:59:17+02:00
logf21a78b5a31b13d5b6bb84c23c4a35e64402d0e0
tree323eae3c35e580119e8758a52c64f2246512ff61
parent0ace906477d0dd1d6e7cb4a02180fc6c09684870
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.debug.SelfInfo.Elf: don't support DWARF unwinding for Hexagon and PowerPC

As for SPARC, FP-based unwinding is superior on these.

1 files changed, 4 insertions(+), 16 deletions(-)

lib/std/debug/SelfInfo/Elf.zig+4-16
......@@ -94,28 +94,22 @@ pub const can_unwind: bool = s: {
9494 // Notably, we are yet to support unwinding on ARM. There, unwinding is not done through
9595 // `.eh_frame`, but instead with the `.ARM.exidx` section, which has a different format.
9696 const archs: []const std.Target.Cpu.Arch = switch (builtin.target.os.tag) {
97 // Not supported yet: arm, m68k, sparc64
97 // Not supported yet: arm, m68k
9898 .haiku => &.{
9999 .aarch64,
100 .powerpc,
101100 .riscv64,
102101 .x86,
103102 .x86_64,
104103 },
105 // Not supported yet: arc, arm/armeb/thumb/thumbeb, csky, m68k, or1k, sparc/sparc64, xtensa
104 // Not supported yet: arc, arm/armeb/thumb/thumbeb, csky, m68k, or1k, xtensa
106105 .linux => &.{
107106 .aarch64,
108107 .aarch64_be,
109 .hexagon,
110108 .loongarch64,
111109 .mips,
112110 .mipsel,
113111 .mips64,
114112 .mips64el,
115 .powerpc,
116 .powerpcle,
117 .powerpc64,
118 .powerpc64le,
119113 .riscv32,
120114 .riscv64,
121115 .s390x,
......@@ -134,28 +128,23 @@ pub const can_unwind: bool = s: {
134128 // Not supported yet: arm
135129 .freebsd => &.{
136130 .aarch64,
137 .powerpc64,
138 .powerpc64le,
139131 .riscv64,
140132 .x86_64,
141133 },
142 // Not supported yet: arm/armeb, m68k, mips64/mips64el, sparc/sparc64
134 // Not supported yet: arm/armeb, m68k, mips64/mips64el
143135 .netbsd => &.{
144136 .aarch64,
145137 .aarch64_be,
146138 .mips,
147139 .mipsel,
148 .powerpc,
149140 .x86,
150141 .x86_64,
151142 },
152 // Not supported yet: arm, sparc64
143 // Not supported yet: arm
153144 .openbsd => &.{
154145 .aarch64,
155146 .mips64,
156147 .mips64el,
157 .powerpc,
158 .powerpc64,
159148 .riscv64,
160149 .x86,
161150 .x86_64,
......@@ -165,7 +154,6 @@ pub const can_unwind: bool = s: {
165154 .x86,
166155 .x86_64,
167156 },
168 // Not supported yet: sparc64
169157 .solaris => &.{
170158 .x86_64,
171159 },