From 8f9a873fce14337e113a3837603a11ade06da533 Mon Sep 17 00:00:00 2001 From: pkubaj Date: Mon, 4 Feb 2019 16:06:32 +0000 Subject: [PATCH] Fix accessing PC on FreeBSD/powerpc and powerpc64 --- m4/pc_from_ucontext.m4 | 1 + 1 file changed, 1 insertion(+) diff --git a/m4/pc_from_ucontext.m4 b/m4/pc_from_ucontext.m4 index 7114bd0..0c7ee28 100644 --- a/m4/pc_from_ucontext.m4 +++ b/m4/pc_from_ucontext.m4 @@ -33,6 +33,7 @@ AC_DEFUN([AC_PC_FROM_UCONTEXT], pc_fields="$pc_fields uc_mcontext.arm_pc" # Linux (arm arch 5) pc_fields="$pc_fields uc_mcontext.gp_regs[[PT_NIP]]" # Suse SLES 11 (ppc64) pc_fields="$pc_fields uc_mcontext.mc_eip" # FreeBSD (i386) + pc_fields="$pc_fields uc_mcontext.mc_srr0" # FreeBSD (powerpc, powerpc64) pc_fields="$pc_fields uc_mcontext.mc_rip" # FreeBSD (x86_64 [untested]) pc_fields="$pc_fields uc_mcontext.__gregs[[_REG_EIP]]" # NetBSD (i386) pc_fields="$pc_fields uc_mcontext.__gregs[[_REG_RIP]]" # NetBSD (x86_64)