From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8832 invoked by alias); 17 Jul 2006 17:46:58 -0000 Received: (qmail 8784 invoked by uid 22791); 17 Jul 2006 17:46:58 -0000 X-Spam-Check-By: sourceware.org Received: from fra-del-01.spheriq.net (HELO fra-del-01.spheriq.net) (195.46.51.97) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 17 Jul 2006 17:46:55 +0000 Received: from fra-out-02.spheriq.net (fra-out-02.spheriq.net [195.46.51.130]) by fra-del-01.spheriq.net with ESMTP id k6HHkmKp022777 for ; Mon, 17 Jul 2006 17:46:48 GMT Received: from fra-cus-02.spheriq.net (fra-cus-02.spheriq.net [195.46.51.38]) by fra-out-02.spheriq.net with ESMTP id k6HHkkSr029095 for ; Mon, 17 Jul 2006 17:46:47 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by fra-cus-02.spheriq.net with ESMTP id k6HHkjhI008637 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Mon, 17 Jul 2006 17:46:46 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 01C49DA41; Mon, 17 Jul 2006 17:46:44 +0000 (GMT) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 105EA4776F; Mon, 17 Jul 2006 17:46:43 +0000 (GMT) Received: from [164.129.15.13] (bri1043.bri.st.com [164.129.15.13]) by mail1.bri.st.com (MOS 3.5.8-GR) with ESMTP id CHV24247 (AUTH stubbsa); Mon, 17 Jul 2006 18:46:41 +0100 (BST) Message-ID: <44BBCD01.2030405@st.com> Date: Mon, 17 Jul 2006 17:46:00 -0000 From: Andrew STUBBS User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] set/unset/show substitute-path commands (take 2) References: <20060715054902.GD1393@adacore.com> <44BB586E.7040107@st.com> <20060717170933.GD1280@adacore.com> In-Reply-To: <20060717170933.GD1280@adacore.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00208.txt.bz2 Joel Brobecker wrote: >> What if the user tries to substitute the same path twice? I think it >> should delete the old rule (maybe query) and add the new one to the end. > > I think we are getting dragged into over-engineering this feature. > If documentation is clear enough that it just adds, then he knows > he has to remove the previous rule before he introduces the new one. > That's plenty good enough in my opinion. I'm not sure that follows the principle of least surprise. You've already written the code to find and delete entries. >> Is the latter case really an error? I would have thought not, since >> there's no way for a script to check the status before giving the command. > > I personally think so, but I don't have a strong opinion on this. > The error can be removed if this is the consensus. I can just imagine myself having a script which deliberately clears the list, but then dies because it was already clear. FWIW, the 'directory' command does not complain if you try to reinitialise an empty source path. (I suppose the workaround would be to define an arbitrary rule and then clear them all). Andrew