This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 00/16] Add styling to the gdb CLI and TUI
- From: Tom Tromey <tom at tromey dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Thu, 29 Nov 2018 15:43:59 -0700
- Subject: Re: [PATCH 00/16] Add styling to the gdb CLI and TUI
- References: <20181128001435.12703-1-tom@tromey.com> <83k1kxfzwo.fsf@gnu.org>
>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
Eli> Will the Windows TUI build support styling out of the box? It uses
Eli> ncurses.
I think it should work, but you'd have to "set style enabled on" first.
Eli> And I don't think I understand what you mean by "filter escape
Eli> sequences from the output". Where (on what level) would such filter
Eli> be installed, given that output is written directly to the console?
I think either utils.c would have to be modified to change where it
sends output, or stdio_file::puts would have to be modified. The idea
there would be to call a host-specific function; and then on Windows do
the filtering+styling if the output is going to the terminal.
Eli> I see that you introduced the emit_style_escape function that switches
Eli> styles. What I don't think I understand is whether it will work to
Eli> have a Windows implementation of that that calls a function which
Eli> causes the text output after that to use given colors? It seems it
Eli> will, because the code calls emit_style_escape before and after each
Eli> string, but I cannot be sure.
Doing it that way can't work due to buffering. Also, this approach
would be undesirable anyway, because GNU Source Highlight emits escape
codes -- that's why I abandoned my earlier plan of implementing styling
as objects in the utils.c buffer. Instead, I think filtering the escape
sequences is really the only way.
Tom