28.6.5.6 Other GDB Buffers

Other buffers provided by M-x gdb whose display you can optionally request include:

Locals Buffer

This buffer displays the values of local variables of the current stack frame for simple data types (see Information on a frame in The GNU debugger). Press RET or click mouse-2 on the value if you want to edit it.

Arrays and structures display their type only. With GDB 6.4 or later, you can examine the value of the local variable at point by typing RET, or with a mouse-2 click. With earlier versions of GDB, use RET or mouse-2 on the type description (‘[struct/union]’ or ‘[array]’). See Watch Expressions.

To display the Locals buffer, type M-x gdb-display-locals-buffer.

I/O Buffer

If the program you are debugging uses standard input and output streams for interaction with the user, or emits a significant amount of output to its standard output, you may wish to separate its I/O from interaction with GDB. Use the command M-x gdb-display-io-buffer to show a window with a buffer to which Emacs redirects the input and output from the program you are debugging.

Registers Buffer

This buffer displays the values held by the registers (see Registers in The GNU debugger). Request the display of this buffer with the command M-x gdb-display-registers-buffer. Press RET or click mouse-2 on a register if you want to edit its value. With GDB 6.4 or later, recently changed register values display with font-lock-warning-face.

Assembler Buffer

The assembler buffer displays the current frame as machine code. An arrow points to the current instruction, and you can set and remove breakpoints as in a source buffer. Breakpoint icons also appear in the fringe or margin. To request the display of this buffer, use M-x gdb-display-disassembly-buffer.

Memory Buffer

The memory buffer lets you examine sections of program memory (see Examining memory in The GNU debugger). Click mouse-1 on the appropriate part of the header line to change the starting address or number of data items that the buffer displays. Alternatively, use S or N respectively. Click mouse-3 on the header line to select the display format or unit size for these data items. Use M-x gdb-display-memory-buffer to request display of this buffer.

When gdb-many-windows is non-nil, the locals buffer shares its window with the registers buffer, just like breakpoints and threads buffers. To switch from one to the other, click with mouse-1 on the relevant button in the header line.