| ... | @@ -1796,6 +1796,7 @@ pub const DwarfInfo = struct { | ... | @@ -1796,6 +1796,7 @@ pub const DwarfInfo = struct { |
| 1796 | }; | 1796 | }; |
| 1797 | | 1797 | |
| 1798 | var update_tail: ?*RegisterUpdate = null; | 1798 | var update_tail: ?*RegisterUpdate = null; |
| | 1799 | var has_next_ip = true; |
| 1799 | for (context.vm.rowColumns(row)) |column| { | 1800 | for (context.vm.rowColumns(row)) |column| { |
| 1800 | if (column.register) |register| { | 1801 | if (column.register) |register| { |
| 1801 | if (register == cie.return_address_register) { | 1802 | if (register == cie.return_address_register) { |
| ... | @@ -1828,11 +1829,15 @@ pub const DwarfInfo = struct { | ... | @@ -1828,11 +1829,15 @@ pub const DwarfInfo = struct { |
| 1828 | update_tail = tail.prev; | 1829 | update_tail = tail.prev; |
| 1829 | } | 1830 | } |
| 1830 | | 1831 | |
| 1831 | context.pc = abi.stripInstructionPtrAuthCode(mem.readIntSliceNative(usize, try abi.regBytes( | 1832 | if (has_next_ip) { |
| 1832 | context.thread_context, | 1833 | context.pc = abi.stripInstructionPtrAuthCode(mem.readIntSliceNative(usize, try abi.regBytes( |
| 1833 | cie.return_address_register, | 1834 | context.thread_context, |
| 1834 | context.reg_context, | 1835 | cie.return_address_register, |
| 1835 | ))); | 1836 | context.reg_context, |
| | 1837 | ))); |
| | 1838 | } else { |
| | 1839 | context.pc = 0; |
| | 1840 | } |
| 1836 | (try abi.regValueNative(usize, context.thread_context, abi.ipRegNum(), context.reg_context)).* = context.pc; | 1841 | (try abi.regValueNative(usize, context.thread_context, abi.ipRegNum(), context.reg_context)).* = context.pc; |
| 1837 | std.debug.print(" new context.pc: 0x{x}\n", .{context.pc}); | 1842 | std.debug.print(" new context.pc: 0x{x}\n", .{context.pc}); |
| 1838 | | 1843 | |