This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: setting breakpoints with C++ typedef names [was: Re: debug information]


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]