From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8541 invoked by alias); 27 Apr 2011 16:41:36 -0000 Received: (qmail 8378 invoked by uid 22791); 27 Apr 2011 16:41:34 -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:41:20 +0000 Received: by pwi10 with SMTP id 10so1097214pwi.0 for ; Wed, 27 Apr 2011 09:41:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.0.7 with SMTP id 7mr2462965pba.188.1303922479350; Wed, 27 Apr 2011 09:41:19 -0700 (PDT) Received: by 10.68.40.131 with HTTP; Wed, 27 Apr 2011 09:41:19 -0700 (PDT) Date: Wed, 27 Apr 2011 16:41:00 -0000 Message-ID: Subject: 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 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/msg00157.txt.bz2 Hi all - We're using GDB to debug a C++ project, and we're running into something new: We 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. We have tried gdb 7.0.1 and 7.2. We'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. I'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? Is there a workaround? Thanks, Brian