[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sigsegv.c: add OpenBSD/powerpc64 support

From: Christian Weisgerber
Subject: sigsegv.c: add OpenBSD/powerpc64 support
Date: Sat, 11 Sep 2021 22:19:50 +0200

gnulib's sigsegv.c has support for OpenBSD on a number of architectures.
Currently, it treats powerpc64 the same as powerpc, but that is not
correct and will not compile.

Here's a patch to add powerp64 support:

diff b6bae60d83eda6b168368fa40f42ade9dfc86df0 /home/naddy/tmp/gnulib
blob - 998c82768cb6f7aa0a418551645c9910851ff9c8
file + lib/sigsegv.c
--- lib/sigsegv.c
+++ lib/sigsegv.c
@@ -511,8 +511,15 @@ int libsigsegv_version = LIBSIGSEGV_VERSION;
 #  define SIGSEGV_FAULT_STACKPOINTER  scp->sc_regs[29]
-# elif defined __powerpc__ || defined __powerpc64__
+# elif defined __powerpc64__
+/* See the definition of 'struct sigcontext' in
+   openbsd-src/sys/arch/powerpc64/include/signal.h.  */
+#  define SIGSEGV_FAULT_STACKPOINTER  scp->sc_sp
+# elif defined __powerpc__
 /* See the definition of 'struct sigcontext' and 'struct trapframe' in
    openbsd-src/sys/arch/powerpc/include/signal.h.  */
Christian "naddy" Weisgerber                          naddy@mips.inka.de

reply via email to

[Prev in Thread] Current Thread [Next in Thread]