How to close layout SRC windows in gdb?

DebuggingGdb

Debugging Problem Overview


When debugging with GDB, i usually using layout src to check my code. But when i open it, i don't know how to close it. It seems that there are some other layout, and when open a new layout, it will split the window, but i still can not found a command to merge the splitted windows.

Debugging Solutions


Solution 1 - Debugging

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.

Solution 2 - Debugging

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionFrank ChengView Question on Stackoverflow
Solution 1 - Debuggingks1322View Answer on Stackoverflow
Solution 2 - DebuggingCiro Santilli Путлер Капут 六四事View Answer on Stackoverflow