Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
libunwind/src/UnwindCursor.hpp
Show First 20 Lines • Show All 649 Lines • ▼ Show 20 Lines | |||||
template <typename A, typename R> | template <typename A, typename R> | ||||
bool UnwindCursor<A, R>::validReg(int regNum) { | bool UnwindCursor<A, R>::validReg(int regNum) { | ||||
if (regNum == UNW_REG_IP || regNum == UNW_REG_SP) return true; | if (regNum == UNW_REG_IP || regNum == UNW_REG_SP) return true; | ||||
#if defined(_LIBUNWIND_TARGET_X86_64) | #if defined(_LIBUNWIND_TARGET_X86_64) | ||||
if (regNum >= UNW_X86_64_RAX && regNum <= UNW_X86_64_R15) return true; | if (regNum >= UNW_X86_64_RAX && regNum <= UNW_X86_64_R15) return true; | ||||
#elif defined(_LIBUNWIND_TARGET_ARM) | #elif defined(_LIBUNWIND_TARGET_ARM) | ||||
if (regNum >= UNW_ARM_R0 && regNum <= UNW_ARM_R15) return true; | if ((regNum >= UNW_ARM_R0 && regNum <= UNW_ARM_R15) || | ||||
regNum == UNW_ARM_RA_AUTH_CODE) | |||||
return true; | |||||
#elif defined(_LIBUNWIND_TARGET_AARCH64) | #elif defined(_LIBUNWIND_TARGET_AARCH64) | ||||
if (regNum >= UNW_AARCH64_X0 && regNum <= UNW_ARM64_X30) return true; | if (regNum >= UNW_AARCH64_X0 && regNum <= UNW_ARM64_X30) return true; | ||||
#endif | #endif | ||||
return false; | return false; | ||||
} | } | ||||
template <typename A, typename R> | template <typename A, typename R> | ||||
unw_word_t UnwindCursor<A, R>::getReg(int regNum) { | unw_word_t UnwindCursor<A, R>::getReg(int regNum) { | ||||
▲ Show 20 Lines • Show All 1,480 Lines • Show Last 20 Lines |