Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Assembly GDB switch between GUI tables

Tags:

assembly

gdb

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 ?

like image 888
Koinos Avatar asked Apr 19 '26 21:04

Koinos


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

like image 94
Peter Cordes Avatar answered Apr 23 '26 14:04

Peter Cordes



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!