blob: af6612e857e01d15a99cdca254a1ff9f95538a42 [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,
Brad Bishop996bc452019-12-02 13:05:15 -050015 #if defined(__powerpc__) && !defined(__powerpc64__)
16@@ -104,7 +104,7 @@ static void signal_segv(int signum, sigi
Brad Bishop00ab2372019-10-14 11:06:18 -040017 ucontext->uc_mcontext.gregs[i]
18 #endif
19 );
Brad Bishop996bc452019-12-02 13:05:15 -050020-#endif /* alpha, ia64, kFreeBSD, arm, hppa, aarch64 */
21+#endif /* alpha, ia64, kFreeBSD, arm, hppa, aarch64 riscv */
Brad Bishop00ab2372019-10-14 11:06:18 -040022
23 #if defined(SIGSEGV_STACK_X86) || defined(SIGSEGV_STACK_IA64)
24 # if defined(SIGSEGV_STACK_IA64)