From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104572 invoked by alias); 28 Jul 2015 18:17:50 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 104561 invoked by uid 89); 28 Jul 2015 18:17:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham 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; Tue, 28 Jul 2015 18:17:49 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 2958235996E; Tue, 28 Jul 2015 18:17:48 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-116-41.ams2.redhat.com [10.36.116.41]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6SIHiAe007192 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 28 Jul 2015 14:17:47 -0400 Date: Tue, 28 Jul 2015 18:17:00 -0000 From: Jan Kratochvil To: Doug Evans Cc: gdb , Gary Benson Subject: Re: Isn't it OK to drop 'set write'? Message-ID: <20150728181744.GA16897@host1.jankratochvil.net> References: <20150726204905.GA18543@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00070.txt.bz2 On Tue, 28 Jul 2015 19:51:02 +0200, Doug Evans wrote: > OOC, how does it simplify the build-id patchset? For writable files one needs to use gdb_bfd_fopen() but normally one has to use gdb_bfd_open() which provides bfd-caching. But they are called similarly so that is not such a complication. Rather the GDB codebase already contains an exception: writing into executable files is not supported for target: sysroots where Gary wrote as a reason: /* gdb_bfd_fopen does not support "target:" filenames. */ But I see it rather due to gdb_bfd_open() and not gdb_bfd_fopen(), more specifically its gdb_bfd_openr_iovec() - the real underlying reason is that BFD provides bfd_openr_iovec() but nothing like bfd_openrw_iovec(). As "target:" should be preferred in general this makes the writability a bit limited functionality. gdbserver should support FILEIO_O_RDWR so on the gdbserver protocol side that should be OK. For the build-id patchset I am unifying files opening API so all the differences mess it up a bit. Jan