This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [patch] Add libstdc++ type printers for class templates


>>>>> "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


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