From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1552 invoked by alias); 19 Jan 2009 15:31:04 -0000 Received: (qmail 1544 invoked by uid 22791); 19 Jan 2009 15:31:03 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_93 X-Spam-Check-By: sourceware.org Received: from eu1sys200aog103.obsmtp.com (HELO eu1sys200aog103.obsmtp.com) (207.126.144.115) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 19 Jan 2009 15:30:59 +0000 Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob103.postini.com ([207.126.147.11]) with SMTP ID DSNKSXScsHWHFeHUPBsyNGUppd51BeNCNJOb@postini.com; Mon, 19 Jan 2009 15:30:59 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1ADC5DAD0 for ; Mon, 19 Jan 2009 15:30:00 +0000 (GMT) Received: from mail2.gnb.st.com (mail2.gnb.st.com [164.129.119.59]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id ABFD54C040 for ; Mon, 19 Jan 2009 15:30:31 +0000 (GMT) Received: from [164.129.122.46] (gnx2504.gnb.st.com [164.129.122.46]) by mail2.gnb.st.com (MOS 3.8.7a) with ESMTP id CZL49466 (AUTH lyon); Mon, 19 Jan 2009 16:31:00 +0100 (CET) Message-ID: <49749C97.80000@st.com> Date: Mon, 19 Jan 2009 15:31:00 -0000 From: Christophe LYON User-Agent: Thunderbird 2.0.0.19 (X11/20081209) MIME-Version: 1.0 To: gdb@sourceware.org Subject: Re: gdb.cp/templates.exp, ctor/dtor breakpoints, etc.... References: <49705F42.5080609@st.com> <20090116150357.GA14717@caradoc.them.org> <4970BFAC.2070301@st.com> <20090116171843.GA26829@caradoc.them.org> In-Reply-To: <20090116171843.GA26829@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-01/txt/msg00104.txt.bz2 On 16.01.2009 18:18, Daniel Jacobowitz wrote: > On Fri, Jan 16, 2009 at 06:11:08PM +0100, Christophe LYON wrote: >> Doing this, I follow GCC behaviour, but I get a regression. If we don't >> consider this a GCC bug, it means that the way GDB recognizes ctor/dtor >> (any probably any overloaded function) is to be revisited? Am I right? > > Yes, all of the name recognition stuff is broken. We shouldn't be > relying on mangled names, since there are compilers we can not change > as easily as GCC or yours that do not emit them. > Well, currently the gdb.cp/templates.exp is still KFAIL, so I guess the decision was that GCC should not output mangled names (somewhat confirmed by http://gcc.gnu.org/ml/gcc/2001-12/msg00260.html). But... if GDB does not rely on mangled names, how is it supposed to find the right template instantiation when trying to set a breakpoint on a function? For instance in templates.exp, where the T5 template is defined, how to find the T5 ctor, if all the ctor instantiations are named "T5" ? Should GDB analyse all the type definition in .debug_info and find the right type? Christophe.