This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Add libstdc++ type printers for class templates
- From: Tom Tromey <tromey at redhat dot com>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, pmuldoon at redhat dot com
- Date: Mon, 14 Jul 2014 14:08:22 -0600
- Subject: Re: [patch] Add libstdc++ type printers for class templates
- Authentication-results: sourceware.org; auth=none
- References: <20140714142159 dot GF4871 at redhat dot com>
>>>>> "Jonathan" == Jonathan Wakely <jwakely@redhat.com> writes:
Jonathan> This defines a new style of Python type printer that
Jonathan> recognizes templates and can be used to omit default template
Jonathan> arguments from the typename GDB prints, e.g. showing
Jonathan> std::vector<T, std::allocator<T>> as simply std::vector<T>.
Jonathan> Additionally, T will get processed by the type recognizers so
Jonathan> if it's a standard typedef or template it will also get
Jonathan> displayed in its abbreviated form.
Nice.
I'd hoped to eventually implement this automatically using some
information from gcc; see:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49090
https://sourceware.org/bugzilla/show_bug.cgi?id=15251
However I haven't gotten around to it; and anyway your approach is nice
and not only doesn't conflict with the above, but may continue to be
useful even if the above is implemented.
Jonathan> This passes the python testsuite but I'll wait for comments before
Jonathan> committing, in case my use of the GDB API or Python can be improved by
Jonathan> anyone.
It looked fine to me.
Tom