From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118458 invoked by alias); 27 May 2015 10:16:42 -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 118448 invoked by uid 89); 27 May 2015 10:16:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 27 May 2015 10:16:41 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4RAGbPE017261 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 27 May 2015 06:16:37 -0400 Received: from blade.nx (ovpn-116-66.ams2.redhat.com [10.36.116.66]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4RAGajJ014890; Wed, 27 May 2015 06:16:36 -0400 Received: by blade.nx (Postfix, from userid 1000) id D507B264075; Wed, 27 May 2015 11:16:35 +0100 (BST) Date: Wed, 27 May 2015 10:16:00 -0000 From: Gary Benson To: Pedro Alves Cc: gdb-patches@sourceware.org, Eli Zaretskii , Doug Evans , Iago =?iso-8859-1?Q?L=F3pez?= Galeiras Subject: Re: [PATCH 6/9 v2] Implement mount namespace support for native Linux targets Message-ID: <20150527101635.GD19722@blade.nx> References: <1429186791-6867-1-git-send-email-gbenson@redhat.com> <1430395542-16017-7-git-send-email-gbenson@redhat.com> <555DF2DA.3040703@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <555DF2DA.3040703@redhat.com> X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00653.txt.bz2 Pedro Alves wrote: > On 04/30/2015 01:05 PM, Gary Benson wrote: > > This commit allows GDB to access executables and shared libraries > > on native Linux targets where GDB and the inferior have different > > mount namespaces. > > > +/* Implementation of to_fileio_open. */ > > + > > +static int > > +linux_nat_fileio_open (struct target_ops *self, > > + struct inferior *inf, const char *filename, > > + int flags, int mode, int *target_errno) > > +{ > > + int nat_flags; > > + int fd; > > + > > + if (fileio_to_host_openflags (flags, &nat_flags) == -1) > > + { > > + *target_errno = FILEIO_EINVAL; > > + return -1; > > + } > > + > > + /* We do not need to convert MODE, since the fileio protocol > > + uses the standard values. */ > > Hmm, I'm not seeing how the fileio constants have to necessarily > match the host's. So I don't understand this comment. What > are these standard values? Hmmm, I just copied this from inf_child_fileio_open. Maybe I should fix that first, with some convertor function that the compiler can essentially optimize away *if* the values really do match. > Otherwise this looks good to me. I'll leave the "set debug" flag's > name up to you. Cool, thanks. Cheers, Gary -- http://gbenson.net/