From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27502 invoked by alias); 3 Mar 2004 19:26:09 -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 27485 invoked from network); 3 Mar 2004 19:26:08 -0000 Received: from unknown (HELO hawaii.kealia.com) (209.3.10.89) by sources.redhat.com with SMTP; 3 Mar 2004 19:26:08 -0000 Received: by hawaii.kealia.com (Postfix, from userid 2049) id 39541C5FF; Wed, 3 Mar 2004 11:26:07 -0800 (PST) To: Paul Hilfinger Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Introduce notion of "search name" References: <20040303191550.7307DF2DB8@nile.gnat.com> From: David Carlton Date: Fri, 19 Mar 2004 00:09:00 -0000 In-Reply-To: <20040303191550.7307DF2DB8@nile.gnat.com> (Paul Hilfinger's message of "Wed, 3 Mar 2004 14:15:50 -0500 (EST)") Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Reasonable Discussion, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-03/txt/msg00054.txt.bz2 On Wed, 3 Mar 2004 14:15:50 -0500 (EST), Paul Hilfinger said: > The modification to the signature of symbol_natural_name is to allow the > option of delayed (lazy) evaluation of the demangled name, which is > actually the point of introducing search names. Personally, I would leave the signature as is and cast away the constness when you eventually add this lazy demangling. My justification is that the operation is logically a const operation; you're planning to generate some information on the fly, but it wouldn't actually change the state of the object. Obviously this would work better if GDB were written in C++ (since, for example, we could declare the affect field in the symbol to be mutable); I'm honestly not sure if my suggestion is idiomatic C or not. (Then again, const and C have never been the closest of cousins to begin with.) David Carlton carlton@kealia.com From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27502 invoked by alias); 3 Mar 2004 19:26:09 -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 27485 invoked from network); 3 Mar 2004 19:26:08 -0000 Received: from unknown (HELO hawaii.kealia.com) (209.3.10.89) by sources.redhat.com with SMTP; 3 Mar 2004 19:26:08 -0000 Received: by hawaii.kealia.com (Postfix, from userid 2049) id 39541C5FF; Wed, 3 Mar 2004 11:26:07 -0800 (PST) To: Paul Hilfinger Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Introduce notion of "search name" References: <20040303191550.7307DF2DB8@nile.gnat.com> From: David Carlton Date: Wed, 03 Mar 2004 19:26:00 -0000 In-Reply-To: <20040303191550.7307DF2DB8@nile.gnat.com> (Paul Hilfinger's message of "Wed, 3 Mar 2004 14:15:50 -0500 (EST)") Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Reasonable Discussion, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-03.o/txt/msg00054.txt Message-ID: <20040303192600.ExPyrxRaPyDiiPBGHuKWbPf5yQfrF36hKDxmQwk9Sm4@z> On Wed, 3 Mar 2004 14:15:50 -0500 (EST), Paul Hilfinger said: > The modification to the signature of symbol_natural_name is to allow the > option of delayed (lazy) evaluation of the demangled name, which is > actually the point of introducing search names. Personally, I would leave the signature as is and cast away the constness when you eventually add this lazy demangling. My justification is that the operation is logically a const operation; you're planning to generate some information on the fly, but it wouldn't actually change the state of the object. Obviously this would work better if GDB were written in C++ (since, for example, we could declare the affect field in the symbol to be mutable); I'm honestly not sure if my suggestion is idiomatic C or not. (Then again, const and C have never been the closest of cousins to begin with.) David Carlton carlton@kealia.com