darwin: update mcontext_t definition for aarch64 to add neon state

This commit is contained in:
kcbanner
2023-07-04 13:40:50 -04:00
parent 412cd789bf
commit 576ffaa329
4 changed files with 28 additions and 6 deletions

View File

@@ -445,7 +445,14 @@ pub inline fn getContext(context: *StackTraceContext) bool {
}
const result = have_getcontext and os.system.getcontext(context) == 0;
if (native_os == .macos) assert(context.mcsize == @sizeOf(std.c.mcontext_t));
if (native_os == .macos) {
// TODO: Temp, to discover this size via aarch64 CI
if (context.mcsize != @sizeOf(std.c.mcontext_t)) {
print("context.mcsize does not match! {} vs {}\n", .{ context.mcsize, @sizeOf(std.c.mcontext_t)});
}
assert(context.mcsize == @sizeOf(std.c.mcontext_t));
}
return result;
}