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


On 14/07/14 14:08 -0600, Tom Tromey wrote:
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.

Thanks for checking it. One thing I should have mentioned is the
inconsistency between regex subgroups and string replacement fields:

   add_one_template_type_printer(obj, 'unique_ptr<T>',
           'unique_ptr<(.*), std::default_delete<\\1 ?> >',
           'unique_ptr<{1}>')

It might seem odd that the last argument uses {1} not \\1 but the
reason is that what gets substituted there is not actually \\1 but
rather the result of applying type printers to \\1, and I implemented
the substitution via string.format(), rather than reimplementing most
of re.sub() by hand.


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