Brad Bishop | 00ab237 | 2019-10-14 11:06:18 -0400 | [diff] [blame] | 1 | Add riscv specific checks to choose correct gregs and context structure definitions |
| 2 | |
| 3 | Upstream-Status: Pending |
| 4 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 5 | --- a/sigsegv.c |
| 6 | +++ b/sigsegv.c |
| 7 | @@ -91,7 +91,7 @@ static void signal_segv(int signum, sigi |
| 8 | a2j_error("info.si_errno = %d", info->si_errno); |
| 9 | a2j_error("info.si_code = %d (%s)", info->si_code, si_codes[info->si_code]); |
| 10 | a2j_error("info.si_addr = %p", info->si_addr); |
| 11 | -#if !defined(__alpha__) && !defined(__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__) && !defined(__aarch64__) |
| 12 | +#if !defined(__alpha__) && !defined(__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__) && !defined(__aarch64__) && !defined(__riscv) |
| 13 | for(i = 0; i < NGREG; i++) |
| 14 | a2j_error("reg[%02d] = 0x" REGFORMAT, i, |
Brad Bishop | 996bc45 | 2019-12-02 13:05:15 -0500 | [diff] [blame] | 15 | #if defined(__powerpc__) && !defined(__powerpc64__) |
| 16 | @@ -104,7 +104,7 @@ static void signal_segv(int signum, sigi |
Brad Bishop | 00ab237 | 2019-10-14 11:06:18 -0400 | [diff] [blame] | 17 | ucontext->uc_mcontext.gregs[i] |
| 18 | #endif |
| 19 | ); |
Brad Bishop | 996bc45 | 2019-12-02 13:05:15 -0500 | [diff] [blame] | 20 | -#endif /* alpha, ia64, kFreeBSD, arm, hppa, aarch64 */ |
| 21 | +#endif /* alpha, ia64, kFreeBSD, arm, hppa, aarch64 riscv */ |
Brad Bishop | 00ab237 | 2019-10-14 11:06:18 -0400 | [diff] [blame] | 22 | |
| 23 | #if defined(SIGSEGV_STACK_X86) || defined(SIGSEGV_STACK_IA64) |
| 24 | # if defined(SIGSEGV_STACK_IA64) |