aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2025-09-08 20:49:17 +0100
committermlugg <mlugg@mlugg.co.uk>2025-09-30 13:44:52 +0100
commit2743fdb7ce3471e77caed7adf0e8657fa66716a0 (patch)
tree0d671c4cbb3799e3e4f5e89bdac5bc0bb3d6250a /lib/std/debug.zig
parent229f0a01b86a04b354a0d6ad29d3c0e7be05d03e (diff)
downloadzig-2743fdb7ce3471e77caed7adf0e8657fa66716a0.tar.gz
zig-2743fdb7ce3471e77caed7adf0e8657fa66716a0.zip
std.debug: try removing a probably-redundant condition
Diffstat (limited to 'lib/std/debug.zig')
-rw-r--r--lib/std/debug.zig15
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig
index f57fcd80a0..87af0eefb9 100644
--- a/lib/std/debug.zig
+++ b/lib/std/debug.zig
@@ -1285,20 +1285,7 @@ fn handleSegfaultPosix(sig: i32, info: *const posix.siginfo_t, ctx_ptr: ?*anyopa
break :info .{ addr, name };
};
- // MLUGG TODO: this doesn't make any sense at all?
- const use_context = switch (native_arch) {
- .x86,
- .x86_64,
- .arm,
- .armeb,
- .thumb,
- .thumbeb,
- .aarch64,
- .aarch64_be,
- => true,
- else => false,
- };
- if (ThreadContext == noreturn or !use_context) return handleSegfault(addr, name, null);
+ if (ThreadContext == noreturn) return handleSegfault(addr, name, null);
// Some kernels don't align `ctx_ptr` properly, so we'll copy it into a local buffer.
var copied_ctx: ThreadContextBuf = undefined;