From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27204 invoked by alias); 20 May 2011 19:10:13 -0000 Received: (qmail 27196 invoked by uid 22791); 20 May 2011 19:10:11 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 May 2011 19:09:43 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p4KJ9h67019590 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 20 May 2011 15:09:43 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p4KJ9goh007972; Fri, 20 May 2011 15:09:43 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p4KJ9gZJ008094; Fri, 20 May 2011 15:09:42 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id AB7B8378D08; Fri, 20 May 2011 13:09:41 -0600 (MDT) From: Tom Tromey To: Keith Seitz Cc: gdb-patches@sourceware.org Subject: Re: The future of dwarf2_physname References: <4DD44983.7060406@redhat.com> Date: Fri, 20 May 2011 19:10:00 -0000 In-Reply-To: <4DD44983.7060406@redhat.com> (Keith Seitz's message of "Wed, 18 May 2011 15:34:43 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00496.txt.bz2 >>>>> "Keith" == Keith Seitz writes: Keith> So the first question to be asked here is, Should we adopt Jan's Keith> patch, or some variation of it, to use DW_AT_linkage_name when Keith> available? I think so. In fact, I think it should be preferred. My reasoning is that when DW_AT_linkage_name exists, it is definitive. Our exposure here is to compiler bugs (which would be very bad ones -- but not our problem) and to demangler bugs -- something I am not extremely concerned about. And, we have seen bugs where the DWARF is very incorrect but the linkage name is not (I think these have been fixed, but the point is that they confound physname, and even reasonably recent compilers, like the F13 gcc, still have this.) However, it is also now clear to me that we do need physname. First, there are cases where GCC does not emit DW_AT_linkage_name. I finally filed the one case we know about: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49047 Second, maybe DW_AT_linkage_name will be dropped in order to shrink debuginfo. Third, there are other compilers. Keith> The only hesitation I have is the compiler issues. Just using Keith> DW_AT_linkage_name instead of computing it has lead to many test Keith> regressions with differing compiler versions. [Again, I have only Keith> tested gcc.] Based on Jan's response, and discussions we've had recently, it seems that the regressions in question are really just differences between physname and the demangler, correct? And the problem specifically is that template functions have the return type in the demangled form, requiring users, for the time being, to add quotes? Keith> The bigger issue is what to do for 7.3, which has been in limbo for Keith> quite some time awaiting resolution of c++/12506 (for which I have Keith> posted patches). Keith> I guess there are basically two options: Keith> 1) Keep physname & apply the 12266/12506 patchset (when approved) Keith> 2) Adopt Jan's patch and fix the fallout now Or (3) Apply both and make linkage_name the preferred choice. At present this is what I think we should do. Keith> My big fear with #2 is "fixing" linespecs (yet again). Any changes to Keith> this area take an unimaginably large amount of time and effort. I think for 7.3 we would accept that there are some regressions, and then fix them for a future release. I am partial to Jan's view that we should be using the full name of the object, and then have symbol aliases or code in linespec to expand nice shortcuts to the full name. Tom