Re: Registering pretty-printers

Tom Tromey
2009-06-26T20:37:57Z

Vladimir> There are two important points I propose:
Vladimir> 1. Having a file at top-level, as opposed in some subdir which name
Vladimir> differs.
Vladimir> 2. Having a file with fixed name.
Vladimir> I am probably wrong, but neither of this is true with the current
Vladimir> recommended approach.

Tom> Yeah. But isn't this just a matter of documenting "this is how we
Tom> recommend you distribute stand-alone printers"?

I have been thinking more about this problem. I am now wondering if
we could have a solution based on Python Eggs. Background reading:

http://peak.telecommunity.com/DevCenter/PythonEggs

My rough idea would be that a suite of pretty-printers would be
packaged as an Egg. We would define a specific resource which would
name the registration function.

Hook files could continue to work more or less as they do now.

An IDE could upload Python code to gdb to invoke the registration
function manually.

I haven't tried to experiment with this, but based on my reading so
far, it seems like it ought to work. What do you think?

Tom