From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31404 invoked by alias); 5 Feb 2003 05:42:58 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31395 invoked from network); 5 Feb 2003 05:42:57 -0000 Received: from unknown (HELO jackfruit.Stanford.EDU) (171.64.38.136) by 172.16.49.205 with SMTP; 5 Feb 2003 05:42:57 -0000 Received: (from carlton@localhost) by jackfruit.Stanford.EDU (8.11.6/8.11.6) id h155gu529290; Tue, 4 Feb 2003 21:42:56 -0800 X-Authentication-Warning: jackfruit.Stanford.EDU: carlton set sender to carlton@math.stanford.edu using -f To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: [rfa] replace SYMBOL_SOURCE_NAME by SYMBOL_PRINT_NAME References: <20030205030631.GA25425@nevyn.them.org> From: David Carlton Date: Wed, 05 Feb 2003 05:42:00 -0000 In-Reply-To: <20030205030631.GA25425@nevyn.them.org> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-02/txt/msg00166.txt.bz2 On Tue, 4 Feb 2003 22:06:31 -0500, Daniel Jacobowitz said: > On Tue, Feb 04, 2003 at 06:00:34PM -0800, David Carlton wrote: >> Here's a patch to begin dealing with the issue. It renames >> SYMBOL_SOURCE_NAME to SYMBOL_PRINT_NAME and adds a comment making it >> clear that it's only suitable for output. > I still don't understand why you want to rename it. Why not just > clarify the comment? Some reasons: 1) The current name is inaccurate. Sometimes it gives the source name of the symbol in question, sometimes it doesn't. Functions or macros should have accurate names: we shouldn't depend on people actually reading comments any more than we have to. 2) Some people seem to be under the impression that SYMBOL_SOURCE_NAME always gives the demangled name (if there is one); it was used that way in an e-mail thread a month or so ago, for example. Such people might well use it incorrectly when working on GDB, unless the macro is actually removed. It's the same theory as Andrew's adding 'deprecated' to the names of things he doesn't like. 3) No matter what happens to SYMBOL_SOURCE_NAME, it's definitely necessary to introduce a macro that actually gives the source code name of a symbol. It'll be a lot easier to remember to use SYMBOL_NATURAL_NAME (or whatever we end up calling it) if there's not a macro around called SYMBOL_SOURCE_NAME to compete with it in our fallible memories. David Carlton carlton@math.stanford.edu