This is the mail archive of the
gdb@sourceware.org
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: <200611191342.48724.pogonyshev@gmx.net> <20061121100701.6b980f48.bkoz@redhat.com> <200611212225.28377.pogonyshev@gmx.net> <20061122130341.a4436ce2.bkoz@redhat.com>
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
long...
Oh. I finally understand you. Yes, this is a drag.
You want to be able to do:
(gdb) b bar(ipod)
instead of
(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.
Martin