Source
pub fn init(
allocator: Allocator,
thread_context: *std.debug.ThreadContext,
) !UnwindContext {
comptime assert(supports_unwinding);
const pc = stripInstructionPtrAuthCode(
(try regValueNative(thread_context, ip_reg_num, null)).*,
);
const context_copy = try allocator.create(std.debug.ThreadContext);
std.debug.copyContext(thread_context, context_copy);
return .{
.allocator = allocator,
.cfa = null,
.pc = pc,
.thread_context = context_copy,
.reg_context = undefined,
.vm = .{},
.stack_machine = .{},
};
}