| author | |
| committer | |
| log | 80f6b8c4b3a6dcb17dcd9bb3ecaf528b3da9c54e |
| tree | a3d7e036a042b687b9995c3054f467673c9c0b68 |
| parent | c383cd50d5eb3b677493ab0058d860a9177a2679 |
I broke this when porting this logic for the `std.debug` rework in
https://github.com/ziglang/zig/pull/25227. The offset that I copied was
actually being treated as relative to the address of the *saved* base
pointer. I think it makes more sense to do what I did and just treat all
offsets as relative to this frame's base.1 files changed, 2 insertions(+), 0 deletions(-)
lib/std/debug.zig+2| ... | ... | @@ -993,6 +993,8 @@ const StackIterator = union(enum) { |
| 993 | 993 | |
| 994 | 994 | /// Offset of the saved return address wrt the frame pointer. |
| 995 | 995 | const ra_offset = off: { |
| 996 | if (native_arch.isRISCV()) break :off -1 * @sizeOf(usize); | |
| 997 | if (native_arch.isSPARC()) break :off 15 * @sizeOf(usize); | |
| 996 | 998 | if (native_arch.isPowerPC64()) break :off 2 * @sizeOf(usize); |
| 997 | 999 | // On s390x, r14 is the link register and we need to grab it from its customary slot in the |
| 998 | 1000 | // register save area (ELF ABI s390x Supplement §1.2.2.2). |