GNU Emacs
Emacs
Dashboard

27.6.5.4 Threads Buffer

The GDB Threads buffer displays a summary of the threads in the debugged program. See Debugging programs with
multiple threads
in The GNU debugger. To select a thread, move point there and press RET ( gdb-select-thread), or click on it with mouse-2. This also displays the associated source buffer, and updates the contents of the other GDB buffers.

You can customize variables in the gdb-buffers group to select fields included in GDB Threads buffer.

gdb-thread-buffer-verbose-names

Show long thread names like ‘ Thread 0x4e2ab70 (LWP 1983)’.

gdb-thread-buffer-arguments

Show arguments of thread top frames.

gdb-thread-buffer-locations

Show file information or library names.

gdb-thread-buffer-addresses

Show addresses for thread frames in threads buffer.

To view information for several threads simultaneously, use the following commands from the GDB Threads buffer.

d

Display disassembly buffer for the thread at current line ( gdb-display-disassembly-for-thread).

f

Display the GDB Stack buffer for the thread at current line ( gdb-display-stack-for-thread).

l

Display the GDB Locals buffer for the thread at current line ( gdb-display-locals-for-thread).

r

Display the GDB Registers buffer for the thread at current line ( gdb-display-registers-for-thread).

Their upper-case counterparts, D, F , L and R, display the corresponding buffer in a new frame.

When you create a buffer showing information about some specific thread, it becomes bound to that thread and keeps showing actual information while you debug your program. The mode indicator for each GDB buffer shows the number of the thread whose information that buffer displays. The thread number is also included in the name of each bound buffer.

Further commands are available in the GDB Threads buffer which depend on the mode of GDB that is used for controlling execution of your program. See Multithreaded Debugging.