blob: 23618f18a166c54225580e59cceb4e03e4ea12e8 [file] [log] [blame]
Brad Bishop00ab2372019-10-14 11:06:18 -04001Add riscv specific checks to choose correct gregs and context structure definitions
2
3Upstream-Status: Pending
4Signed-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,
15 #if defined(__powerpc__)
16@@ -102,7 +102,7 @@ static void signal_segv(int signum, sigi
17 ucontext->uc_mcontext.gregs[i]
18 #endif
19 );
20-#endif /* alpha, ia64, kFreeBSD, arm, hppa aarch64 */
21+#endif /* alpha, ia64, kFreeBSD, arm, hppa aarch64 riscv */
22
23 #if defined(SIGSEGV_STACK_X86) || defined(SIGSEGV_STACK_IA64)
24 # if defined(SIGSEGV_STACK_IA64)