| ... | ... | @@ -1086,10 +1086,12 @@ const StackIterator = union(enum) { |
| 1086 | 1086 | switch (it.*) { |
| 1087 | 1087 | .ctx_first => |context_ptr| { |
| 1088 | 1088 | // After the first frame, start actually unwinding. |
| 1089 | | it.* = if (SelfInfo != void and SelfInfo.can_unwind and fp_usability != .ideal) |
| 1090 | | .{ .di = .init(context_ptr) } |
| 1091 | | else |
| 1092 | | .{ .fp = context_ptr.getFp() }; |
| 1089 | if (SelfInfo != void and SelfInfo.can_unwind and fp_usability != .ideal) { |
| 1090 | it.* = .{ .di = .init(context_ptr) }; |
| 1091 | } else { |
| 1092 | const fp = applyOffset(context_ptr.getFp(), stack_bias) orelse return .end; |
| 1093 | it.* = .{ .fp = fp }; |
| 1094 | } |
| 1093 | 1095 | |
| 1094 | 1096 | // The caller expects *return* addresses, where they will subtract 1 to find the address of the call. |
| 1095 | 1097 | // However, we have the actual current PC, which should not be adjusted. Compensate by adding 1. |
| ... | ... | @@ -1099,7 +1101,7 @@ const StackIterator = union(enum) { |
| 1099 | 1101 | const di = getSelfDebugInfo() catch unreachable; |
| 1100 | 1102 | const ret_addr = di.unwindFrame(io, unwind_context) catch |err| { |
| 1101 | 1103 | const pc = unwind_context.pc; |
| 1102 | | const fp = unwind_context.getFp(); |
| 1104 | const fp = applyOffset(unwind_context.getFp(), stack_bias) orelse return .end; |
| 1103 | 1105 | unwind_context.deinit(); |
| 1104 | 1106 | it.* = .{ .fp = fp }; |
| 1105 | 1107 | return .{ .switch_to_fp = .{ |