From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6778 invoked by alias); 27 May 2003 15:55:28 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 6733 invoked from network); 27 May 2003 15:55:28 -0000 Received: from unknown (HELO jackfruit.Stanford.EDU) (171.64.38.136) by sources.redhat.com with SMTP; 27 May 2003 15:55:28 -0000 Received: (from carlton@localhost) by jackfruit.Stanford.EDU (8.11.6/8.11.6) id h4RFtKB18711; Tue, 27 May 2003 08:55:20 -0700 X-Authentication-Warning: jackfruit.Stanford.EDU: carlton set sender to carlton@math.stanford.edu using -f To: Hilfinger@otisco.mckusick.com Cc: drow@mvista.com, gdb@sources.redhat.com, ezannoni@redhat.com, jimb@redhat.com Subject: Re: [rfc] lookups with natural/linkage names References: <200305240811.h4O8BJu10644@otisco.McKusick.COM> <20030524143554.GA14905@nevyn.them.org> <200305261042.h4QAgxc07019@otisco.McKusick.COM> From: David Carlton Date: Tue, 27 May 2003 15:55:00 -0000 In-Reply-To: <200305261042.h4QAgxc07019@otisco.McKusick.COM> 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-05/txt/msg00357.txt.bz2 On Mon, 26 May 2003 03:42:59 -0700, "Paul N. Hilfinger" said: > Are nested function names ever mangled? We seldom consider nested > functions, because they don't occur in official C/C++, but they do > occur in GCC's extensions (and in Pascal and Ada). On IRIX, using > Dwarf-2, nested function names do NOT appear in the minimal symbols > (whereas on Linux, they do). I hope you see why this makes me > slightly nervous. Eep. I hadn't thought of that case. Still, I don't see why there would be a particular reason to mangle names of nested functions. The point of mangling is to communicate rich information about an object over an information channel whose format is tightly constrained. But for local objects, you can use the debug info as the information channel, and its format is very rich. So information about, say, types of arguments to nested functions can (and should, in my reading of DWARF 2, though I admit that the standard is annoyingly vague about names) be transmitted in other parts of the debug info, not in the name attribute. Having said that, there's still the question of whether or not GDB currently depends on getting information from the mangled name. And the answer is that, currently, it does that to an extent that is probably unhealthy. David Carlton carlton@math.stanford.edu