diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2019-02-03 15:24:18 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2019-02-03 15:24:18 +0000 |
commit | 6c060c5ebaa00da76822786be5e023bde7c863ac (patch) | |
tree | b5ea4f43754a14a85ec4595a745eac1c843cc49f /lib/libunwind | |
parent | 7dd0a9c99308f1e1addecc364c4c6e243eb70a63 (diff) |
Turns out I botched the previous commit. While making the %o7 + 8 bit
consistent across the various low-level interfaces that handle the
instruction pointer, reality turns out to be a bit more subtle.
On SPARC, DWARF2 uses r15 (which maps to %o7) as the return address column.
This means that we should not add/subtract 8 when it reads/updates the
register state while processing DWARF2 instructions. That in turn means
that getIP() and setIP() should not have been changed in my previous commit.
ok visa@
Diffstat (limited to 'lib/libunwind')
-rw-r--r-- | lib/libunwind/src/Registers.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libunwind/src/Registers.hpp b/lib/libunwind/src/Registers.hpp index 2a23bb77c9b..6676daa1b09 100644 --- a/lib/libunwind/src/Registers.hpp +++ b/lib/libunwind/src/Registers.hpp @@ -2648,8 +2648,8 @@ public: uint64_t getSP() const { return _registers.__o[6] + 2047; } void setSP(uint64_t value) { _registers.__o[6] = value - 2047; } - uint64_t getIP() const { return _registers.__o[7] + 8; } - void setIP(uint64_t value) { _registers.__o[7] = value - 8; } + uint64_t getIP() const { return _registers.__o[7]; } + void setIP(uint64_t value) { _registers.__o[7] = value; } uint64_t getWCookie() const { return _wcookie; } private: |