Registering pretty-printers

Vladimir Prus vladimir@codesourcery.com
Sun Jun 7 23:11:00 GMT 2009


Hello,
I have a concern about the way Python pretty-printers seem to work now.
To register a pretty-printer, one is supposed to do this
(according to http://permalink.gmane.org/gmane.comp.debugging.archer/1352)

	import sys
	sys.path.insert(0, 'XXX')
	from libstdcxx.v6.printers import register_libstdcxx_printers
	register_libstdcxx_printers (None)

This seem to contain quite a lot of information that is specific
for given pretty printer -- like the package name, and the name
of function to register pretty-printers. Some other project
might have package named boost and function called register_boost_printers,
and some other package might use something else. As result, it is not
possible to IDE user to just point at directory and have pretty-printers
loaded. Can we maybe require that the __init__ module does registration?

I am not quite sure how to avoid specifying this random (for user)
libstdcxx.v6 part -- any ideas?

- Volodya




More information about the Gdb mailing list