This is the mail archive of the
mailing list for the GDB project.
Re: setting breakpoints with C++ typedef names [was: Re: debug information]
- From: Martin Sebor <sebor at roguewave dot com>
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Cc: Paul Pogonyshev <pogonyshev at gmx dot net>, libstdc++ at gcc dot gnu dot org, gdb at sourceware dot org
- Date: Fri, 24 Nov 2006 14:23:52 -0700
- Subject: Re: setting breakpoints with C++ typedef names [was: Re: debug information]
- References: <email@example.com> <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org>
Benjamin Kosnik wrote:
But still function names include full type name: `b 'bar(basic_pod<int>)''.
Not much of a problem in this case, but sometimes the full name is very
Oh. I finally understand you. Yes, this is a drag.
You want to be able to do:
(gdb) b bar(ipod)
(gdb) b bar(basic_pod<int>)
This is especially troublesome when the real type is private to
the implementation, as in, for example,
void foo (std::map<T, U>::iterator);
In order for a user to set a breakpoint on foo they need to know
that the type of libstdc++'s map<T, U>::iterator is really called
std::_Rb_tree_iterator<std::pair<const T, U> >
(and something completely different when using a different
implementation of the library).
I expect this use of private names to become even more pervasive
when (and if) typedef templates are implemented.