From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8776 invoked by alias); 27 May 2011 14:48:28 -0000 Received: (qmail 8767 invoked by uid 22791); 27 May 2011 14:48:27 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 27 May 2011 14:48:10 +0000 Received: from hpaq5.eem.corp.google.com (hpaq5.eem.corp.google.com [172.25.149.5]) by smtp-out.google.com with ESMTP id p4REm8N0014866 for ; Fri, 27 May 2011 07:48:09 -0700 Received: from pxi9 (pxi9.prod.google.com [10.243.27.9]) by hpaq5.eem.corp.google.com with ESMTP id p4RElTrX003628 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Fri, 27 May 2011 07:48:07 -0700 Received: by pxi9 with SMTP id 9so1388691pxi.14 for ; Fri, 27 May 2011 07:48:06 -0700 (PDT) Received: by 10.68.25.68 with SMTP id a4mr788909pbg.217.1306507686790; Fri, 27 May 2011 07:48:06 -0700 (PDT) Received: from coign.google.com ([66.109.103.84]) by mx.google.com with ESMTPS id o2sm564880pbj.81.2011.05.27.07.48.04 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 May 2011 07:48:06 -0700 (PDT) From: Ian Lance Taylor To: Jonas Paulsson Cc: Subject: Re: FW: debug info, template class member method References: Date: Sat, 28 May 2011 15:52:00 -0000 In-Reply-To: (Jonas Paulsson's message of "Fri, 27 May 2011 10:13:21 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-05/txt/msg00402.txt.bz2 Jonas Paulsson writes: > I am trying to debug a template class, but I get a long method name and "...which has no line number information.". The member function is defined in the .h file, inside the class definition. > > I wonder if it is possible to step through a template member function with gdb? I have tried g++ -O0 -ggdb -fno-default-inline, but no luck. Which version of gcc and which version of gdb? Stepping through inline template member functions seem to move between working and non-working with changes to the tools. Unfortunately I don't know of any way to get it to work when it is not working. If you are using a current version of gcc, please file a bug report with a test case and including info about the gdb you are using. Thanks. Ian