Tom Tromey
Thu Feb 9 18:59:00 GMT 2017

>>>>> "Simon" == Simon Marchi <> writes:

Simon> Well first of all, what is your idea of how the coloring should be?

I was more focused on infrastructure, not the defaults.  So I just left
it all to the user.  In fact my branch doesn't actually even have the
colorizing code, just the Python ui-out stuff; I have a separate .py
file that I use for experimenting.

Now that I look at that file again I do see a wrap_hint method, so maybe
the wrapping wasn't really a problem like I'd thought.  Hard to recall.
Also I see I didn't even really try to implement "set color" in this
code, so I must have just been changing the Python by hand.  Haha.

If you want to see the branch I can push it.


Looks nice.

>> And, finally, for something like "set color", there's no good way to
>> implement completion because there isn't a list of the table- and
>> column-names.  This could be done by introducing enums or something
>> like
>> that, but at that point the patch is going to be beyond what I would
>> want to commit to.

Simon> I don't understand this part.  Which tables/columns?

My approach is based on reusing ui-out stuff, the idea being to
associate a color with the ui-out table (or tuple or list) name and the
field name.

I suppose this wouldn't actually work for value printing, since that
doesn't use ui-out.  So maybe some other design is needed; or maybe
value printing needs to be changed a bit.


More information about the Gdb mailing list