You can always leave or enter TUI at any time durring debug session. For example you can do it with ctrl+x a key binding. 25.2 TUI Key Bindings.
Answer from ks1322 on Stack OverflowYou can always leave or enter TUI at any time durring debug session. For example you can do it with ctrl+x a key binding. 25.2 TUI Key Bindings.
vi Readline input bug
In GDB 7.7, Ctrl-x + a does not work if you have in your ~/.inputrc:
set editing-mode vi
set keymap vi
If I remove those lines it works.
This seems to be mentioned at in the following bug report: https://sourceware.org/bugzilla/show_bug.cgi?id=15163
I have requested a workaround at https://sourceware.org/ml/gdb/2015-06/msg00009.html and Andrew Burgess replied that he had just submitted a well received patch to add:
tui enable
tui disable
so in future versions we should have commands as an alternative to the shortcuts.
I have later tested this on GDB 8.1 in Ubuntu 18.04 and it worked perfectly.
But then I saw the light and moved from TUI to GDB Dashboard: https://github.com/cyrus-and/gdb-dashboard which is simply more powerful and less buggy.
See also: http://superuser.com/questions/180512/how-to-turn-off-gdb-tui
You can enter / leave the TUI mode with one of this combinations:
- C-x C-a
- C-x a
- C-x A
This is typically (no need to lift the Ctrl key):
- Ctrl + X + A
Because of the bug Ulerich mentioned which breaks the mappings if you have vi mode in your .inputrc, I have requested a workaround here and Andrew Burgess replied that he had just submitted a well received patch to add:
tui enable
tui disable
So in future versions we should have commands as an alternative to the shortcuts.
I have later tested this on GDB 8.1 in Ubuntu 18.04 and it worked perfectly.
But then I saw the light and moved from TUI to GDB Dashboard which is simply more powerful and less buggy.
See also: https://stackoverflow.com/questions/8409540/how-to-close-layout-src-windows-in-gdb
I’ve typically only used my IDE’s native debugger, but I’ve switched to GDB predominately now.
By default, there is no TUI, I need to specify with —tui
I can’t really justify it? Even if I’m using GDB’s Python interpreter or looking at local variables.
It's called the TUI (no kidding). Start for example with gdbtui or gdb -tui ...
Please also see this answer by Ciro Santilli. It wasn't available in 2012 to the best of my knowledge, but definitely worth a look.
You can trigger it dynamically by push ctrl+x and ctrl+a.