This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Add std::tuple printer to Python pretty-printer library
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Fri, 16 Oct 2009 13:34:04 -0700
- Subject: Re: Add std::tuple printer to Python pretty-printer library
- References: <4AD781D3.1090108@redhat.com>
> This patches adds a GDB Python pretty-printer for tuples. For
> example, given this example tuple:
>
> std::tuple<std::string, int, std::deque<int>, std::vector<int>>
> t_tuple;
>
> the GDB output with the printers loaded will now be:
>
> std::tuple containing = {
> [1] = "Hello World",
> [2] = 42,
> [3] = std::deque with 3 elements = {1, 3, 5},
> [4] = std::vector of length 2, capacity 2 = {9, 5}
> }
Much better, thanks.
> 2009-10-15 Phil Muldoon <pmuldoon@redhat.com>
>
> * python/libstdcxx/v6/printers.py (StdTuplePrinter): New printer.
> (build_libstdcxx_dictionary): Add StdTuplePrinter registration.
Ok.
best,
-benjamin