Comment 2 for bug 1850993

Horst Schirmeier (horst) wrote :

Further investigation reveals that this is actually an upstream cgdb 0.6.7 deficiency. Newer GDBs do output coloring, which cgdb can deal with starting with version 0.7.0. In other words, when Ubuntu moved to a newer GDB version, it should also have bumped cgdb to 0.7.0 or newer.

Possible workarounds:

 - Disable GDB colors when running cgdb:
    cgdb -ex 'set style enabled off' a.out
    (probably use a bash alias cgdb="cgdb -ex 'set style enabled off'")

    GDB still uses colors while it starts up, but doesn't during use.

 - Disable GDB colors permanently: add "set style enabled off" to ~/.gdbinit

For a proper fix, Ubuntu should switch to cgdb 0.7.0 or newer. See also bug #1826319.