From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17793 invoked by alias); 27 Jun 2018 14:31:43 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 98097 invoked by uid 89); 27 Jun 2018 14:31:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*M:home, pub, availability, Embedded X-HELO: mail.bootlin.com Received: from mail.bootlin.com (HELO mail.bootlin.com) (62.4.15.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 27 Jun 2018 14:31:26 +0000 Received: by mail.bootlin.com (Postfix, from userid 110) id C473320702; Wed, 27 Jun 2018 16:31:23 +0200 (CEST) Received: from windsurf.home (AAubervilliers-681-1-87-188.w90-88.abo.wanadoo.fr [90.88.29.188]) by mail.bootlin.com (Postfix) with ESMTPSA id 8896720012; Wed, 27 Jun 2018 16:31:23 +0200 (CEST) Date: Wed, 27 Jun 2018 14:31:00 -0000 From: Thomas Petazzoni To: Simon Marchi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] nat/fork-inferior: include linux-ptrace.h Message-ID: <20180627163123.6da3d93c@windsurf.home> In-Reply-To: <3acce11a3e5ed352af945ab71739468b@polymtl.ca> References: <20180625080547.7629-1-thomas.petazzoni@bootlin.com> <3acce11a3e5ed352af945ab71739468b@polymtl.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2018-06/txt/msg00649.txt.bz2 Hello Simon, On Wed, 27 Jun 2018 10:24:07 -0400, Simon Marchi wrote: > > diff --git a/gdb/nat/fork-inferior.c b/gdb/nat/fork-inferior.c > > index 8b59387fa5..05167628a6 100644 > > --- a/gdb/nat/fork-inferior.c > > +++ b/gdb/nat/fork-inferior.c > > @@ -26,6 +26,7 @@ > > #include "common-gdbthread.h" > > #include "signals-state-save-restore.h" > > #include "gdb_tilde_expand.h" > > +#include "linux-ptrace.h" > > #include > > > > extern char **environ; > > Hi Thomas, > > fork-inferior.c is also included in native builds for BSDs, AIX, Solaris > and Darwin (see gdb/configure.nat). I am a bit concerned that > linux-ptrace.h could use some Linux-specific things, and thus would > break the other builds. However, I built-tested on FreeBSD and it seems > fine. Worst case, we can probably wrap this include in "#ifdef > __linux__" if that becomes a problem. Or better, this horrible mess of __UCLIBC__ and HAS_NOMMU macros should be replaced by a proper autoconf check testing for the availability of fork(). > Do you have push access, or do you prefer if I push the patch for you? I don't have push access. > I suppose that error was caught by a Buildroot autobuilder? Would it be > possible to have the config, so I can add a similar configuration to my > collection of cross-compiled GDB builds I use for build-testing? The error wasn't caught by the autobuilders, but by the automated build logic we use for http://toolchains.bootlin.com to build toolchains for a wide range of CPU architectures. The failure was https://gitlab.com/free-electrons/toolchains-builder/-/jobs/77021057, and the Buildroot configuration being built was: BR2_m68k=y BR2_m68k_cf5208=y BR2_WGET="wget --passive-ftp -nd -t 3 --no-check-certificate" BR2_HOST_DIR="/opt/m68k-coldfire--uclibc--bleeding-edge-2018.06-1" BR2_GNU_MIRROR="http://ftp.gnu.org/pub/gnu" BR2_KERNEL_HEADERS_4_14=y BR2_TOOLCHAIN_BUILDROOT_LOCALE=y BR2_PTHREAD_DEBUG=y BR2_BINUTILS_VERSION_2_30_X=y BR2_GCC_VERSION_8_X=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_PACKAGE_HOST_GDB=y BR2_GDB_VERSION_8_1=y BR2_INIT_NONE=y # BR2_PACKAGE_BUSYBOX is not set BR2_PACKAGE_GDB=y # BR2_TARGET_ROOTFS_TAR is not set Note that with Buildroot's latest master, this configuration will build fine, because we already merged the fix for the fork/vfork issue. Best regards, Thomas Petazzoni -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com