From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19093 invoked by alias); 19 Jan 2009 15:56:08 -0000 Received: (qmail 19085 invoked by uid 22791); 19 Jan 2009 15:56:08 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_93 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; Mon, 19 Jan 2009 15:56:03 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 295A810829; Mon, 19 Jan 2009 15:56:01 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 05C49101AB; Mon, 19 Jan 2009 15:56:00 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1LOwTo-0001Nr-1H; Mon, 19 Jan 2009 10:56:00 -0500 Date: Mon, 19 Jan 2009 15:56:00 -0000 From: Daniel Jacobowitz To: Christophe LYON Cc: gdb@sourceware.org Subject: Re: gdb.cp/templates.exp, ctor/dtor breakpoints, etc.... Message-ID: <20090119155600.GA5296@caradoc.them.org> Mail-Followup-To: Christophe LYON , gdb@sourceware.org References: <49705F42.5080609@st.com> <20090116150357.GA14717@caradoc.them.org> <4970BFAC.2070301@st.com> <20090116171843.GA26829@caradoc.them.org> <49749C97.80000@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49749C97.80000@st.com> User-Agent: Mutt/1.5.17 (2008-05-11) 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/msg00105.txt.bz2 On Mon, Jan 19, 2009 at 04:30:31PM +0100, Christophe LYON wrote: > 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? They're all named T5::T5 for some X. We get fully qualified type names in the debug info. The function should be contained in or specified by the containing type. Admittedly, for some template cases this gets really out of hand. It's *hard* to represent Template as the name of a type in DWARF. But this can all be done using DW_AT_name; it only gets really tricky if the compiler uses the DWARF extensions for type and value parameters. -- Daniel Jacobowitz CodeSourcery