This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
can't step into, or print variables inside of C++ template function
- From: Brian Budge <brian dot budge at gmail dot com>
- To: gdb at sourceware dot org
- Date: Wed, 27 Apr 2011 09:41:19 -0700
- Subject: can't step into, or print variables inside of C++ template function
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