This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 1/7] Use ui_out_emit_table and ui_out_emit_list in print_thread_info_1


>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:

Simon> I think overall this function is a bad example of how to share code
Simon> between CLI and MI.  There are so many if (is_mi_like_p) that it's
Simon> essentially two functions in one.  Apart from iterating on threads,
Simon> the MI and CLI outputs don't share much...

I think a long term goal should be to remove all those is_mi_like_p
checks.  In some situations this might mean introducing "MI 4" and
fixing up the historical baggage; but that would also be a good thing,
as there are a few places where gdb has remained buggy for the sake of
not breaking existing MI readers.

What I'd really like is for MI to be defined as JSON (it is pretty close
already), but that's maybe a bit much to ask.

A related thought is that if more spots used ui-out (I'm thinking mainly
*-valprint, but maybe there are others), then colorization could be done
at the ui-out layer.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]