[PATCH] Add printf format specifier for printing enumerator

Pedro Alves palves@redhat.com
Fri Feb 5 14:51:00 GMT 2016


On 02/05/2016 02:17 PM, Simon Marchi wrote:

>   (gdb) printf "Visiting node of type %q\n", node
>   Visiting node of type NODE_INTEGER

> What do you think?

Did you consider a convenience function to convert a value
to string, instead?  Then you'd write:

 (gdb) printf "Visiting node of type %s\n", $_as_string(node)

And maybe do other things with it.

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list