- valgrind-glibc-2.18.patch: add support for glibc 2.18 OBS-URL: https://build.opensuse.org/request/show/186969 OBS-URL: https://build.opensuse.org/package/show/devel:tools/valgrind?expand=0&rev=94
59 lines
2.1 KiB
Diff
59 lines
2.1 KiB
Diff
Index: valgrind-3.8.1/configure.in
|
|
===================================================================
|
|
--- valgrind-3.8.1.orig/configure.in
|
|
+++ valgrind-3.8.1/configure.in
|
|
@@ -913,6 +913,13 @@ case "${GLIBC_VERSION}" in
|
|
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
;;
|
|
+ 2.18)
|
|
+ AC_MSG_RESULT(2.18 family)
|
|
+ AC_DEFINE([GLIBC_2_18], 1, [Define to 1 if you're using glibc 2.18.x])
|
|
+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
+ ;;
|
|
darwin)
|
|
AC_MSG_RESULT(Darwin)
|
|
AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
|
|
Index: valgrind-3.8.1/coregrind/vgdb.c
|
|
===================================================================
|
|
--- valgrind-3.8.1.orig/coregrind/vgdb.c
|
|
+++ valgrind-3.8.1/coregrind/vgdb.c
|
|
@@ -102,7 +102,6 @@ I_die_here : (PTRACEINVOKER) architectur
|
|
#include <sys/user.h>
|
|
#if defined(VGO_linux)
|
|
# include <sys/prctl.h>
|
|
-# include <linux/ptrace.h>
|
|
#endif
|
|
#endif
|
|
|
|
@@ -696,7 +695,8 @@ static struct user user_save;
|
|
// runtime check not yet done.
|
|
// 0 : PTRACE_GETREGS runtime check has failed.
|
|
// 1 : PTRACE_GETREGS defined and runtime check ok.
|
|
-#ifdef PTRACE_GETREGS
|
|
+// <sys/ptrace.h> defines PTRACE_GETREGS as enum, check also for PT_GETREGS
|
|
+#if defined PTRACE_GETREGS || defined PT_GETREGS
|
|
static int has_working_ptrace_getregs = -1;
|
|
#endif
|
|
|
|
@@ -707,7 +707,7 @@ static
|
|
Bool getregs (int pid, void *regs, long regs_bsz)
|
|
{
|
|
DEBUG(1, "getregs regs_bsz %ld\n", regs_bsz);
|
|
-# ifdef PTRACE_GETREGS
|
|
+# if defined PTRACE_GETREGS || defined PT_GETREGS
|
|
if (has_working_ptrace_getregs) {
|
|
// Platforms having GETREGS
|
|
long res;
|
|
@@ -778,7 +778,7 @@ Bool setregs (int pid, void *regs, long
|
|
DEBUG(1, "setregs regs_bsz %ld\n", regs_bsz);
|
|
// Note : the below is checking for GETREGS, not SETREGS
|
|
// as if one is defined and working, the other one should also work.
|
|
-# ifdef PTRACE_GETREGS
|
|
+# if defined PTRACE_GETREGS || defined PT_GETREGS
|
|
if (has_working_ptrace_getregs) {
|
|
// Platforms having SETREGS
|
|
long res;
|