| ... | ... | @@ -1740,8 +1740,20 @@ pub const DwarfInfo = struct { |
| 1740 | 1740 | context.reg_context.eh_frame = cie.version != 4; |
| 1741 | 1741 | context.reg_context.is_macho = di.is_macho; |
| 1742 | 1742 | |
| 1743 | | _ = try context.vm.runToNative(context.allocator, context.pc, cie, fde); |
| 1744 | | const row = &context.vm.current_row; |
| 1743 | if (comptime builtin.target.isDarwin()) { |
| 1744 | std.debug.print(" state before:\n", .{}); |
| 1745 | std.debug.print(" cfa {?x}:\n", .{context.cfa}); |
| 1746 | for (context.thread_context.mcontext.ss.regs, 0..) |reg, i| { |
| 1747 | std.debug.print(" {}:0x{x}\n", .{i, reg}); |
| 1748 | } |
| 1749 | std.debug.print(" fp:0x{x}\n", .{context.thread_context.mcontext.ss.fp}); |
| 1750 | std.debug.print(" lr:0x{x}\n", .{context.thread_context.mcontext.ss.lr}); |
| 1751 | std.debug.print(" sp:0x{x}\n", .{context.thread_context.mcontext.ss.sp}); |
| 1752 | std.debug.print(" pc:0x{x}\n", .{context.thread_context.mcontext.ss.pc}); |
| 1753 | } |
| 1754 | |
| 1755 | const row = try context.vm.runToNative(context.allocator, context.pc, cie, fde); |
| 1756 | std.debug.print(" ran to 0x{x}\n", .{row.offset + fde.pc_begin}); |
| 1745 | 1757 | |
| 1746 | 1758 | context.cfa = switch (row.cfa.rule) { |
| 1747 | 1759 | .val_offset => |offset| blk: { |
| ... | ... | @@ -1785,7 +1797,7 @@ pub const DwarfInfo = struct { |
| 1785 | 1797 | |
| 1786 | 1798 | var update_tail: ?*RegisterUpdate = null; |
| 1787 | 1799 | var has_next_ip = false; |
| 1788 | | for (context.vm.rowColumns(row.*)) |column| { |
| 1800 | for (context.vm.rowColumns(row)) |column| { |
| 1789 | 1801 | if (column.register) |register| { |
| 1790 | 1802 | if (register == cie.return_address_register) { |
| 1791 | 1803 | has_next_ip = column.rule != .undefined; |