10

I set a color for the GDB prompt by adding this line to ~/.gdbinit:

set prompt \033[0;32m(gdb) \033[0m

This works fine in GDB, until I open the TUI. It then discards the colors and shows the raw color codes. The same thing happens if I use CGDB.

This is 2015. Is there any way I can have both colors in GDB and also view the source code I'm debugging in a subwindow (like in TUI/CGDB) at the terminal?

4

1 回答 1

2

此 gdb 错误已在不久前(2018 年)修复。此外,gdb 还为 CLI 和 TUI 添加了着色功能。我相信这首先出现在 GDB 9.1 中。

于 2020-02-24T21:28:06.990 回答