Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Feb 2016 18:28:18 +0000 (UTC)
From:      Raphael Kubo da Costa <rakuco@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r407832 - head/sysutils/reptyr/files
Message-ID:  <201602021828.u12ISIwx005176@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rakuco
Date: Tue Feb  2 18:28:18 2016
New Revision: 407832
URL: https://svnweb.freebsd.org/changeset/ports/407832

Log:
  Fix build on 9.3-amd64 after r407349.
  
  9.3-i386, which is what I was using for testing the build on FreeBSD 9, worked
  fine, but 9.3-amd64 was broken with -Werror. Add a patch I sent upstream to
  stop trying to cast NULL into an int, which was making GCC 4.2.1 complain:
  
  platform/freebsd/arch/x86_common.h: In function 'arch_get_register':
  platform/freebsd/arch/x86_common.h:48: warning: cast from pointer to integer of different size
  platform/freebsd/arch/x86_common.h: In function 'arch_set_register':
  platform/freebsd/arch/x86_common.h:57: warning: cast from pointer to integer of different size
  platform/freebsd/arch/x86_common.h:59: warning: cast from pointer to integer of different size
  platform/freebsd/freebsd_ptrace.c: In function 'ptrace_memcpy_to_child':
  platform/freebsd/freebsd_ptrace.c:267: warning: cast from pointer to integer of different size
  platform/freebsd/freebsd_ptrace.c: In function 'ptrace_memcpy_from_child':
  platform/freebsd/freebsd_ptrace.c:282: warning: cast from pointer to integer of different size
  
  PR:		206539

Added:
  head/sysutils/reptyr/files/patch-git_308f600   (contents, props changed)

Added: head/sysutils/reptyr/files/patch-git_308f600
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/reptyr/files/patch-git_308f600	Tue Feb  2 18:28:18 2016	(r407832)
@@ -0,0 +1,36 @@
+commit 308f60064fee6d5707514b65f6acad656a8a4feb
+Author: Raphael Kubo da Costa <rakuco@FreeBSD.org>
+Date:   Tue Feb 2 19:04:11 2016 +0100
+
+    FreeBSD: Do not try to cast NULL to int.
+
+    Passing NULL to the data parameter in calls to ptrace(2) causes failures
+    on 64-bit FreeBSD 9 installations, where GCC 4.2.1 complains like this:
+
+    platform/freebsd/arch/x86_common.h: In function 'arch_get_register':
+    platform/freebsd/arch/x86_common.h:48: warning: cast from pointer to integer of different size
+    platform/freebsd/arch/x86_common.h: In function 'arch_set_register':
+    platform/freebsd/arch/x86_common.h:57: warning: cast from pointer to integer of different size
+    platform/freebsd/arch/x86_common.h:59: warning: cast from pointer to integer of different size
+    platform/freebsd/freebsd_ptrace.c: In function 'ptrace_memcpy_to_child':
+    platform/freebsd/freebsd_ptrace.c:267: warning: cast from pointer to integer of different size
+    platform/freebsd/freebsd_ptrace.c: In function 'ptrace_memcpy_from_child':
+    platform/freebsd/freebsd_ptrace.c:282: warning: cast from pointer to integer of different size
+
+    Make ptrace_command pass 0 to _ptrace_command so that the final
+    expansion looks like this:
+      __ptrace_command((cld), (req), (void*)(addr), (int)(0))
+    instead of
+      __ptrace_command((cld), (req), (void*)(addr), (int)(((void*)0)))
+
+--- platform/freebsd/freebsd_ptrace.c
++++ platform/freebsd/freebsd_ptrace.c
+@@ -47,7 +47,7 @@
+ static int __ptrace_command(struct ptrace_child *child, int req,
+                             void *, int);
+ 
+-#define ptrace_command(cld, req, ...) _ptrace_command(cld, req, ## __VA_ARGS__, NULL, NULL)
++#define ptrace_command(cld, req, ...) _ptrace_command(cld, req, ## __VA_ARGS__, 0, 0)
+ #define _ptrace_command(cld, req, addr, data, ...) __ptrace_command((cld), (req), (void*)(addr), (int)(data))
+ 
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602021828.u12ISIwx005176>