| 713 | |
| 714 | template <typename A, typename R> |
| 715 | bool UnwindCursor<A, R>::validReg(int regNum) { |
| 716 | if (regNum == UNW_REG_IP || regNum == UNW_REG_SP) return true; |
| 717 | #if defined(_LIBUNWIND_TARGET_X86_64) |
| 718 | if (regNum >= UNW_X86_64_RAX && regNum <= UNW_X86_64_RIP) return true; |
| 719 | #elif defined(_LIBUNWIND_TARGET_ARM) |
| 720 | if ((regNum >= UNW_ARM_R0 && regNum <= UNW_ARM_R15) || |
| 721 | regNum == UNW_ARM_RA_AUTH_CODE) |
| 722 | return true; |
| 723 | #elif defined(_LIBUNWIND_TARGET_AARCH64) |
| 724 | if (regNum >= UNW_AARCH64_X0 && regNum <= UNW_ARM64_X30) return true; |
| 725 | #endif |
| 726 | return false; |
| 727 | } |
| 728 | |
| 729 | template <typename A, typename R> |
| 730 | unw_word_t UnwindCursor<A, R>::getReg(int regNum) { |
no test coverage detected