24

I have this GDB TUI/layout on. How do I return to the default GDB view?

I can't just restart GDB, because I have important backtrace on my hand and as long as I have these extra windows I can't scroll well on the basic view.

Peter Mortensen
  • 12,090
  • 23
  • 70
  • 90
user40167
  • 697
  • 3
  • 7
  • 13

2 Answers2

24

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
Peter Mortensen
  • 12,090
  • 23
  • 70
  • 90
jellyfish
  • 341
  • 2
  • 5
  • 4
    But see http://sourceware.org/bugzilla/show_bug.cgi?id=15163, which is a fun gotcha for the vi-inclined. – Rhys Ulerich Feb 20 '13 at 16:54
  • @RhysUlerich thanks! I think that was also mentioned at http://stackoverflow.com/questions/8953720/cannot-leave-tui-mode-with-ctrl-x-a-nor-see-program-output-in-tui-mode , and there is likely to be a workaround soon: http://superuser.com/a/927728/128124 – Ciro Santilli OurBigBook.com Jun 14 '15 at 11:13
10

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

Matthias Braun
  • 1,162
  • 1
  • 17
  • 29