From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23711 invoked by alias); 13 Jul 2006 21:27:52 -0000 Received: (qmail 23702 invoked by uid 22791); 13 Jul 2006 21:27:51 -0000 X-Spam-Check-By: sourceware.org Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 13 Jul 2006 21:27:49 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id BD28548CBFD for ; Thu, 13 Jul 2006 17:27:47 -0400 (EDT) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 27820-01-4 for ; Thu, 13 Jul 2006 17:27:47 -0400 (EDT) Received: from takamaka.act-europe.fr (S0106000f3d96cb6d.vc.shawcable.net [24.84.195.170]) by nile.gnat.com (Postfix) with ESMTP id 494EF48CBEF for ; Thu, 13 Jul 2006 17:27:47 -0400 (EDT) Received: by takamaka.act-europe.fr (Postfix, from userid 507) id BA7DA47EFA; Thu, 13 Jul 2006 14:27:46 -0700 (PDT) Date: Thu, 13 Jul 2006 21:27:00 -0000 From: Joel Brobecker To: gdb@sources.redhat.com Subject: Re: [RFA] New substitute-path commands Message-ID: <20060713212746.GA1519@adacore.com> References: <20060707052219.GA971@adacore.com> <20060707191203.GD971@adacore.com> <20060710054027.GF971@adacore.com> <20060710214706.GA2390@adacore.com> <20060710215114.GA31444@nevyn.them.org> <20060710215630.GB2390@adacore.com> <20060710215839.GA31772@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060710215839.GA31772@nevyn.them.org> User-Agent: Mutt/1.4i Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00072.txt.bz2 [moving back to GDB - summary: On gdb-patches, I was convinced by the feedback that I received that I should spend the effort of implementing multiple rewrite rules immediately. I have a question about that]. The interface is as follow: (gdb) set substitute-path FROM TO (gdb) unset substitute-path [FROM] (gdb) show substitute-path The "set" command will add a substitution rule. My question is the following: When you enter a second rule, should it take precedence over the first one you entered? More generally, should the substitution rules entered last be used first, or the opposite? I'm 50-50 on this: . With first-entered/first-used, you enter the rules following the logic "if blah, then replace with [...]; else if bloh, then replace with [...]; else if [...], then [...]". In other words, you enter the rules in the same order you would write a "program". It seems pretty natural. . With last-entered/first-used, it's possible to override previous entries without having to delete the previous rules. Not so natural to "program", though. Actually, as I'm writing this, I now favor first-entered/first-used. One can delete a rule if he wants to override it. It's marginal anyway. What do you guys think? Thanks, -- Joel