Re: [PATCH 00/16] Add styling to the gdb CLI and TUI

Eli Zaretskii
2019-03-01T13:56:54Z

> Cc: gdb-patches@sourceware.org
> From: Pedro Alves <palves@redhat.com>
> Date: Fri, 1 Mar 2019 13:10:35 +0000
>
> The Windows console in Windows 10 Anniversary Update supports ANSI escape sequences:
>
> [1] https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences
> [2] https://blogs.msdn.microsoft.com/commandline/2017/04/11/windows-10-creators-update-whats-new-in-bashwsl-windows-console/

Yes, I know. I guess GDB will have to use that, at least at some
point, or maybe as an option even today. Thanks for the pointers,
regardless.

> Basically, GDB needs to call SetConsoleMode with
> ENABLE_VIRTUAL_TERMINAL_PROCESSING at early startup to enable the feature.
> There's an example at the bottom of page [1] above.
>
> I have no idea whether that interacts badly with readline or curses, but
> it seems like the ideal solution going forward.

We don't want to require Windows 10 for the styling support, do we?
Older versions of Windows still have quite a few years before they are
unsupported even by Microsoft, let alone GDB.

Or are you saying that you will be unwilling to accept patches that
enable styling on all versions of Windows (by converting SGR sequences
to corresponding Windows API calls)?