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.

Answer from 0xC0000022L on Stack Overflow
🌐
Brown
cs.brown.edu › courses › cs033 › docs › guides › gdb.pdf pdf
CSCI0330 Intro Computer Systems Doeppner gdb Cheatsheet Fall 2018
Quits​ gdb. ... layout​ is a terminal interface which allows the user to view the source file while debugging.
🌐
GNU
ftp.gnu.org › old-gnu › Manuals › gdb › html_chapter › gdb_19.html
Debugging with GDB - GDB Text User Interface
When the TUI mode is left, the curses window management is left and GDB operates using its standard mode writing on the terminal directly. When the TUI mode is entered, the control is given back to the curses windows. The screen is then refreshed. ... Use a TUI layout with only one window.
🌐
GNU Project
sourceware.org › gdb › current › onlinedocs › gdb.html › TUI-Commands.html
TUI Commands (Debugging with GDB)
Here is a more complex example, showing a horizontal layout: (gdb) tui new-layout example {-horizontal src 1 asm 1} 2 status 0 cmd 1
🌐
GNU
gnu.org › software › emacs › manual › html_node › emacs › GDB-User-Interface-Layout.html
GDB User Interface Layout (GNU Emacs Manual)
To toggle between the many windows layout and a simple layout with just the GUD interaction buffer and a source file, type M-x gdb-many-windows.
🌐
USC CS and ECE
bytes.usc.edu › cs104 › wiki › gdb
GDB Cheat Sheet
Note: function breakpoints will not work on functions that take strings as arguments (it’s complicated) on your course VM due to an incompatibility between GCC and GDB. However, this will work properly on newer systems. layout next From the begining of GDB, entering ‘layout next’ once the program is running will show you source code around your current location in the program.
🌐
Swarthmore College
cs.swarthmore.edu › ~zpalmer › cs75 › s23 › guides › gdb
CS75: Debugging x86-64 Assembly with GDB
The first line will ensure that GDB shows assembly in Intel syntax (which we are using in the class) rather than AT&T syntax (which we are not). The next line defines a layout mode which displays the contents of registers at the top, the disassembled program in the middle, and the command window at the bottom.
🌐
Apple Developer
developer.apple.com › library › archive › documentation › DeveloperTools › gdb › gdb › gdb_23.html
Debugging with gdb - gdb Text User Interface
The following layouts are available: ... On top of the command window a status line gives various information concerning the current process begin debugged. The status line is updated when the information it shows changes. The following fields are displayed: ... Indicates the current gdb target ...
Find elsewhere
🌐
niranjanmr
niranjanmr.wordpress.com › 2013 › 04 › 28 › using-gdb-layout-when-debugging-assembly-language-programs
Using gdb layout when debugging Assembly Language Programs | niranjanmr
April 28, 2013 - After setting the break point run the program by typing “run” (or just “r”) at the gdb prompt which will stop at the first break point , which in our case is the _start function. At this point lets invoke “asm” layout by typing “layout asm” at the gdb prompt:
🌐
University of Washington
courses.cs.washington.edu › courses › cse351 › 17au › gdb
CSE 351 GDB
(gdb) layout asm (gdb) layout regs · Note that you want to do them in that order so that the registers window is on top.
🌐
GitHub
gist.github.com › savanovich › eb6ee6b264e773968e71
GDB cheatsheet · GitHub
(gdb) p/a 0x54320 $1 = 0x54320 <_initialize_vx+396> (gdb) p/a &h $2 = 0x7ffff7dd7820 <h> # same as (gdb) info symbol 0x54320 (gdb) info symbol &h h in section .bss of /lib/x86_64-linux-gnu/libc.so.6 (gdb) p (int)$rax $3 = -1
🌐
Dirac
dirac.org › linux › gdb › 02a-Memory_Layout_And_The_Stack.php
Peter's gdb Tutorial: Memory Layout And The Stack
To effectively learn how to use GDB, you must understand frames, which are also called stack frames because they're the frames that comprise the stack. To learn about the stack, we need to learn about the memory layout of an executing program.
🌐
Red Hat
developers.redhat.com › articles › 2022 › 08 › 03 › add-custom-windows-gdb-programming-tui-python
Add custom windows to GDB: Programming the TUI in Python | Red Hat Developer
November 6, 2023 - Now get GDB to display the new window. Start GDB, and enter this command to load and run your Python script, registering the new window type with GDB: ... A layout is just a collection of windows that are displayed together.
🌐
Chang Ge
www-users.cse.umn.edu › ~kauffman › tutorials › gdb
CSCI 2021 Quick Guide to gdb: The GNU Debugger
GDB has no trouble handling assembly code when it is included or when only a binary executable is available. The following commands are useful for this. In TUI mode with the commands layout asm and layout reg, one can get a somewhat ergonomic layout for debugging assembly which looks like this.
🌐
Kauffman77
kauffman77.github.io › tutorials › gdb.html
Quick Guide to gdb: The GNU Debugger
>> gcc collatz.s # compile assembly code without debug symbols >> gdb ./a.out # run gdb on executable (gdb) tui enable # enable text user interface mode (gdb) layout asm # SHOW ASSEMBLY CODE IN SOURCE WINDOW (gdb) break main # set a break point at main (gdb) run # run to the break point (gdb) stepi # STEP A SINGLE ASSMEBLY INSTRUCTION (gdb) si # shorthand for stepi (gdb) layout regs # start displaying registers (gdb) stepi # step to see changes in registers (gdb) break *main + 14 # break at instruction 14 bytes after main (gdb) continue # run to the source line (gdb) stepi # step (gdb) winheight regs +2 # show more of the register window for eflags (gdb) quit # exit the debugger
🌐
GitHub
gist.github.com › edi33416 › c977eda93dcfc56be1fc20925f406f54
GDB intro layout · GitHub
GDB intro layout. GitHub Gist: instantly share code, notes, and snippets.
🌐
Cs-ieee-ist
cs-ieee-ist.github.io › cs-essentials › content › gdb › GUI
Gdb - GUI
You will see that you have the same GDB layout with the prompt but now you also have a big rectangle at the top. This is where all the information will be shown, for example, the source code or the executable disassembled.
🌐
NUS Computing
comp.nus.edu.sg › ~liangzk › cs5231 › stacklayout.pdf pdf
Using GNU's GDB Debugger Memory Layout And The Stack By Peter Jay Salzman
about the stack, we need to learn about the memory layout of an executing · program. The discussion will mainly be theoretical, but to keep things interesting · we'll conclude the chapter with an example of the stack and stack frames using · GDB. The material learned in this chapter may seem rather theoretical, but it does serve ·
🌐
Undo
undo.io › home › enhance your gdb experience with tui many windows
Enhance your GDB experience with TUI many windows
March 20, 2025 - A layout is defined as a sequence of pairs where each pair specifies a window type and a relative size for that window. A simple sequence is arranged as a vertical stack, but by using curly braces and the -horizontal specifier we can nest vertical ...