1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-05-13 07:03:33 +00:00

sigsegv: Improve port to CHERI.

* lib/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER): Define also on CheriBSD.
This commit is contained in:
Bruno Haible
2023-11-10 02:30:28 +01:00
parent 31158ba641
commit 419dc267a9
2 changed files with 9 additions and 2 deletions

View File

@@ -436,11 +436,15 @@ int libsigsegv_version = LIBSIGSEGV_VERSION;
# define SIGSEGV_FAULT_ADDRESS sip->si_addr
# define SIGSEGV_FAULT_CONTEXT ((ucontext_t *) ucp)
# if defined __arm64__ /* 64-bit */
# if defined __arm64__ || defined __aarch64__ /* 64-bit */
/* See sys/arm64/include/ucontext.h. */
# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.mc_gpregs.gp_sp
# if defined __CHERI__
# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.mc_capregs.cap_sp
# else
# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.mc_gpregs.gp_sp
# endif
# elif defined __arm__ || defined __armhf__ /* 32-bit */