From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18501 invoked by alias); 27 Apr 2011 16:43:33 -0000 Received: (qmail 18451 invoked by uid 22791); 27 Apr 2011 16:43:32 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-pw0-f41.google.com (HELO mail-pw0-f41.google.com) (209.85.160.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 27 Apr 2011 16:43:17 +0000 Received: by pwi10 with SMTP id 10so1098602pwi.0 for ; Wed, 27 Apr 2011 09:43:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.63.136 with SMTP id g8mr2379216pbs.121.1303922596589; Wed, 27 Apr 2011 09:43:16 -0700 (PDT) Received: by 10.68.40.131 with HTTP; Wed, 27 Apr 2011 09:43:16 -0700 (PDT) In-Reply-To: References: Date: Wed, 27 Apr 2011 16:43:00 -0000 Message-ID: Subject: Re: can't step into, or print variables inside of C++ template function From: Brian Budge To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2011-04/txt/msg00158.txt.bz2 A quick update: This works under gcc 4.4. Unsure if a bug should be filed against gdb to work with newer debug information, or against gcc for breaking the debug information. Thanks, Brian On Wed, Apr 27, 2011 at 9:41 AM, Brian Budge wrote: > Hi all - > > We're using GDB to debug a C++ project, and we're running into > something new: =A0We can set a breakpoint in a template function (more > precisely, a method inside a template class), but we can't list the > source there, we can't step or next reliably from there, and we can't > print the values of local variables there. > > We tried explicitly instantiating the templates in their own > translation unit, but this didn't help with the problem. =A0We have > tried gdb 7.0.1 and 7.2. =A0We're using g++ 4.5.1 under Ubuntu on > x86-64. > > I should also mention we've been using gdb to debug this exact code > for well over a year. =A0I'm not positive, but it's possible that we > upgraded from gcc 4.4 to 4.5 since we last debugged this specific > piece of code. > > Has anyone seen this? =A0Is there a workaround? > > Thanks, > =A0Brian >