Assembly GDB switch between GUI tables

Viewed 2240

i'm trying to use the gdb debugger for assembly. I can get into pseudo graphical mode using commands:

layout asm
layout regs

And it appears a screen like this this

however if i try to switch between the two tables using the suggested shortcuts ctrl+x, ctrl+0 , nothing happens. Is maybe due to a wrong keyboard layout setting ?

1 Answers

First, that's not a GUI, it's a TUI (Text UI), inside a terminal. (https://sourceware.org/gdb/onlinedocs/gdb/TUI-Commands.html)

Second, the key binding for window-switch is the same as Emacs C-x o:

  • Press and release ctrl+x
  • then o (without control). (lower case letter o as in Oscar, not zero).

It cycles through windows, changing the focus for up/down and left/right arrows. You can also use the GDB command focus next or name a specific window, like focus asm or focus cmd.


Text you type always goes into the command window, so normally you only need to change focus for scrolling around in registers, asm, or source.

You can use command history while the focus is on the asm window by using control-p and control-n, like emacs.


related: some more asm debugging tips at the bottom of https://stackoverflow.com/tags/x86/info

Related