aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug/Dwarf.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-08-02 12:35:49 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-08-02 14:15:03 -0700
commit6d606cc38b4df2b20af9d77367f8ab22bbbea092 (patch)
treefd00a5a549afccf68b6b50cb1f693dc4251eb4a9 /lib/std/debug/Dwarf.zig
parent975c185b92a7d470ea705b28f46a8004bdda3c60 (diff)
downloadzig-6d606cc38b4df2b20af9d77367f8ab22bbbea092.tar.gz
zig-6d606cc38b4df2b20af9d77367f8ab22bbbea092.zip
reintroduce std.Dwarf.abi.supportsUnwinding
There are two concepts here: one for whether dwarf supports unwinding on that target, and another for whether the Zig standard library implements it yet.
Diffstat (limited to 'lib/std/debug/Dwarf.zig')
-rw-r--r--lib/std/debug/Dwarf.zig24
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/std/debug/Dwarf.zig b/lib/std/debug/Dwarf.zig
index e30e3d06ac..991c731549 100644
--- a/lib/std/debug/Dwarf.zig
+++ b/lib/std/debug/Dwarf.zig
@@ -2023,27 +2023,3 @@ fn pcRelBase(field_ptr: usize, pc_rel_offset: i64) !usize {
return std.math.add(usize, field_ptr, @as(usize, @intCast(pc_rel_offset)));
}
}
-
-pub fn supportsUnwinding(target: std.Target) bool {
- return switch (target.cpu.arch) {
- .x86 => switch (target.os.tag) {
- .linux, .netbsd, .solaris, .illumos => true,
- else => false,
- },
- .x86_64 => switch (target.os.tag) {
- .linux, .netbsd, .freebsd, .openbsd, .macos, .ios, .solaris, .illumos => true,
- else => false,
- },
- .arm => switch (target.os.tag) {
- .linux => true,
- else => false,
- },
- .aarch64 => switch (target.os.tag) {
- .linux, .netbsd, .freebsd, .macos, .ios => true,
- else => false,
- },
- // Unwinding is possible on other targets but this implementation does
- // not support them...yet!
- else => false,
- };
-}