From 614bb98f019a37b559ea57168829ec282584b741 Mon Sep 17 00:00:00 2001 From: Sevan Janiyan Date: Mon, 29 Nov 2021 00:44:41 +0000 Subject: [PATCH] sigsegv: Unbreak on Mac OS X PowerPC * lib/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER): Point to the right struct members on PowerPC, __ prefixes were introduced in later versions and do not apply to PowerPC support in OS X 10.4 & 10.5. It is likely further work is required to support versions older than 10.4. Update comment to reflect locations in XNU 792.24.17 as shipped with OS X 10.4.11. --- lib/sigsegv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/sigsegv.c b/lib/sigsegv.c index 347b42644..48210813c 100644 --- a/lib/sigsegv.c +++ b/lib/sigsegv.c @@ -592,10 +592,10 @@ int libsigsegv_version = LIBSIGSEGV_VERSION; # elif defined __powerpc__ /* See the definitions of - - 'ucontext_t' and 'struct __darwin_ucontext' in , - - 'struct __darwin_mcontext' in , and - - 'struct __darwin_ppc_thread_state' in . */ -# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext->__ss.__r1 + - 'ucontext_t' and 'struct __darwin_ucontext' in , + - 'struct __darwin_mcontext' in , and + - 'struct __darwin_ppc_thread_state' in . */ +# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext->ss.r1 # endif -- 2.24.3 (Apple Git-128)