Author: mattip <matti.pi...@gmail.com> Branch: Changeset: r83006:c4d20dd5b286 Date: 2016-03-13 07:45 +0200 http://bitbucket.org/pypy/pypy/changeset/c4d20dd5b286/
Log: fix for linux32, macos diff --git a/rpython/rlib/rvmprof/src/vmprof_config.h b/rpython/rlib/rvmprof/src/vmprof_config.h --- a/rpython/rlib/rvmprof/src/vmprof_config.h +++ b/rpython/rlib/rvmprof/src/vmprof_config.h @@ -9,6 +9,8 @@ #endif #elif defined(__arm__) #define PC_FROM_UCONTEXT uc_mcontext.arm_ip +#elif defined(__linux) && defined(__i386) && defined(__GNUC__) +#define PC_FROM_UCONTEXT uc_mcontext.gregs[REG_EIP] #else /* linux, gnuc */ #define PC_FROM_UCONTEXT uc_mcontext.gregs[REG_RIP] diff --git a/rpython/rlib/rvmprof/src/vmprof_getpc.h b/rpython/rlib/rvmprof/src/vmprof_getpc.h --- a/rpython/rlib/rvmprof/src/vmprof_getpc.h +++ b/rpython/rlib/rvmprof/src/vmprof_getpc.h @@ -43,9 +43,6 @@ #ifndef BASE_GETPC_H_ #define BASE_GETPC_H_ - -#include "vmprof_config.h" - // On many linux systems, we may need _GNU_SOURCE to get access to // the defined constants that define the register we want to see (eg // REG_EIP). Note this #define must come first! @@ -58,6 +55,8 @@ #define _XOPEN_SOURCE 500 #endif +#include "vmprof_config.h" + #include <string.h> // for memcmp #if defined(HAVE_SYS_UCONTEXT_H) #include <sys/ucontext.h> _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit