From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13995 invoked by alias); 19 May 2011 21:00:02 -0000 Received: (qmail 13872 invoked by uid 22791); 19 May 2011 21:00:01 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 19 May 2011 20:59:46 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 10AFE10E0C; Thu, 19 May 2011 20:59:45 +0000 (GMT) Received: from caradoc.them.org (pool-173-75-31-51.pitbpa.fios.verizon.net [173.75.31.51]) by nan.false.org (Postfix) with ESMTP id CEE6C10C10; Thu, 19 May 2011 20:59:44 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.76) (envelope-from ) id 1QNAJr-0007z2-7N; Thu, 19 May 2011 16:59:43 -0400 Date: Thu, 19 May 2011 21:00:00 -0000 From: Daniel Jacobowitz To: Keith Seitz Cc: gdb-patches@sourceware.org Subject: Re: The future of dwarf2_physname Message-ID: <20110519205943.GA7479@caradoc.them.org> Mail-Followup-To: Keith Seitz , gdb-patches@sourceware.org References: <4DD44983.7060406@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4DD44983.7060406@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-05/txt/msg00464.txt.bz2 On Wed, May 18, 2011 at 03:34:43PM -0700, Keith Seitz wrote: > In short, if gdb uses DW_AT[_MIPS]_linkage_name when available, we > can bypass constructing the physname *and* canonicalization, so gdb > would only have to do this when DW_AT[_MIPS]_linkage_name is missing. > Today this only happens AFAIK with gcc and ctors. I don't know about > other compilers. For all intents and purposes, no other current compiler emits DW_AT_MIPS_linkage_name. > This could be a sizable performance win (not yet tested or > quantified). While it does introduce some regressions, many are > compiler problems and some are template problems (the linkage name > contains the return type, and 1) gdb isn't equipped to deal with > that; 2) it makes for a horrible user experience having to specify it > all the time). There might be others, I have only delved into this a > bit myself today. > > So the first question to be asked here is, Should we adopt Jan's > patch, or some variation of it, to use DW_AT_linkage_name when > available? I've spent a lot of time on this question. It's similar to the approach I took in my previous implementation, but I was never happy with it. You get bizarre differences in behavior between compilers (although the same thing does admittedly happen just based on the DWARF output). GCC ideally ought to get away from outputting linkage names; it's a big space cost in the debug information. That offers a potential tie-breaker between the two strategies; keep using the linkage names for old versions of GCC, and transition away as GCC improves. In general, the sort of cross-check Jan has implemented could never reliably pass without extensions to DWARF. Once you get up into templates, especially, there are template arguments that are hard or impossible to represent in template parameter DIEs. -- Daniel Jacobowitz