Add std::tuple printer to Python pretty-printer library

Benjamin Kosnik bkoz@redhat.com
Fri Oct 16 20:34:00 GMT 2009


> 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



More information about the Libstdc++ mailing list