diff options
| author | joerg <joerg@NetBSD.org> | 2018-07-17 19:01:16 +0000 |
|---|---|---|
| committer | joerg <joerg@NetBSD.org> | 2018-07-17 19:01:16 +0000 |
| commit | 2c074b4cc32fdc8a7e1b7f22fc8d8796d4edf024 (patch) | |
| tree | 410edc5f2a49cf271469e9d9bc0ae19bde9c0d86 /sys/lib/libunwind | |
| parent | 84c90804bab2957e3017c51b62aad44f7b7fa5f7 (diff) | |
The semantics of DW_CFA_GNU_args_size have changed subtile over the
years. Adopt the new convention that it is call-site specific and that
it should be applied before moving the IP by personality routines, but
not during normal unwinding. Further discussion can be found in
LLVM's phabricator review D38680.
Diffstat (limited to 'sys/lib/libunwind')
| -rw-r--r-- | sys/lib/libunwind/UnwindCursor.hpp | 3 | ||||
| -rw-r--r-- | sys/lib/libunwind/libunwind.cxx | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/sys/lib/libunwind/UnwindCursor.hpp b/sys/lib/libunwind/UnwindCursor.hpp index e979646179d..763c9b21b70 100644 --- a/sys/lib/libunwind/UnwindCursor.hpp +++ b/sys/lib/libunwind/UnwindCursor.hpp @@ -61,9 +61,6 @@ public: this->setInfoBasedOnIPRegister(true); if (fUnwindInfoMissing) return UNW_STEP_END; - - if (fInfo.extra_args) - setSP(getSP() + fInfo.extra_args); return UNW_STEP_SUCCESS; } __builtin_unreachable(); diff --git a/sys/lib/libunwind/libunwind.cxx b/sys/lib/libunwind/libunwind.cxx index e1897848917..d033f7c346b 100644 --- a/sys/lib/libunwind/libunwind.cxx +++ b/sys/lib/libunwind/libunwind.cxx @@ -277,6 +277,8 @@ void _Unwind_SetIP(struct _Unwind_Context *context, uintptr_t new_value) { unw_proc_info_t info; cursor->getInfo(&info); cursor->setInfoBasedOnIPRegister(false); + if (info.extra_args) + cursor->setSP(cursor->getSP() + info.extra_args); } uintptr_t _Unwind_GetRegionStart(struct _Unwind_Context *context) { |
