Major CGDB Roadmap Question

Skip to first unread message

Bob Rossi

Jan 20, 2021, 7:03:27 PM1/20/21

CGDB has historically worked with all versions of GDB using the
GDB/Annotations interface. Annotations has been supported by GDB for
forever, so CGDB basically worked with every version of GDB in the wild.
This is a good thing.

However, using Annotations does present significant problems for CGDB.
For instance,
- If the debugged program reads from stdin, CGDB supports this poorly
- Pagination of the console output can not be done properly
- GDB's readline is not 100% compatible
- There are many other subtle inconsistencies attempting to mimic the GDB CLI
- There are many others I've closed as won't fix (as it wasn't possible)

In GDB 7.12, released on Oct 7, 2016, GDB released a new command line
feature 'new-ui'. The release note states,
GDB now supports a new mechanism that allows frontends to provide
fully featured GDB console views, as a better alternative to
building such views on top of the "-interpreter-exec console"
command. See the new "new-ui" command below. With that command,
frontends can now start GDB in the traditional command-line mode
running in an embedded terminal emulator widget, and create a
separate MI interpreter running on a specified i/o device. In this
way, GDB handles line editing, history, tab completion, etc. in the
console all by itself, and the GUI uses the separate MI interpreter
for its own control and synchronization, invisible to the command line.

I took some time recently to modify CGDB to use this new GDB feature.
I like what i see. CGDB's code is simpler and the issues above are resolved.
These improvements come at a cost however, CGDB only works with
relatively recent versions of GDB (7.12 or later).

I'm sending this email to determine if anyone supports or objects to me
moving CGDB to the more modern GDB new-ui architecture. This change in
direction will mean CGDB will have a better integration with GDB but
will only work with versions of GDB 7.12 or above.
Please explain your opinions.

Bob Rossi

Gilboa Davara

Jan 22, 2021, 3:37:50 AM1/22/21
to Devel CGDB

NOTE: I maintain cgdb under both Fedora and CentOS/RHEL.

In general, I see no problem in using new(er) gdb which is fully
supported by the latest releases of both Fedora (10) and RHEL8 (8.2)
That said, any chance of getting term support back into cgdb?

- Gilboa

Robert Rossi

Jan 31, 2021, 6:33:06 PM1/31/21
to cgdb,
I've implemented an initial prototype of these changes in the new-ui branch.

If anyone would like to beta test, or provide feedback, it would be greatly appreciated.

Bob Rossi

Robert Rossi

Jan 31, 2021, 6:36:16 PM1/31/21
Hi Gibloa!

Can you clarify what you mean by 'term support'?

If you mean, being able to send input/output to the debugged program, then this feature does exactly that.
You can try it out in the cgdb repo in the new-ui branch.
There is no longer a tty window, you can simply send input/output to a debugged program, just like you would with gdb.

Bob Rossi

You received this message because you are subscribed to the Google Groups "cgdb-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Gilboa Davara

Feb 4, 2021, 10:08:26 AM2/4/21
to Devel CGDB

By term support I indeed mean the "TTY window" feature.
Problem is - gdb's raw input / output makes it nearly impossible to debug console applications with complex TUI. It breaks the display, and input is unreliable.

- Gilboa

Reply all
Reply to author
0 new messages