manpagez: man pages & more
info emacs
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

32.6.5.1 GDB User Interface Layout

If the variable gdb-many-windows is nil (the default value) then M-x gdb normally displays only the GUD buffer. However, if the variable gdb-show-main is also non-nil, it starts with two windows: one displaying the GUD buffer, and the other showing the source for the main function of the program you are debugging.

If gdb-many-windows is non-nil, then M-x gdb displays the following frame layout:

 
+--------------------------------+--------------------------------+
|   GUD buffer (I/O of GDB)      |   Locals buffer                |
|--------------------------------+--------------------------------+
|   Primary Source buffer        |   I/O buffer for debugged pgm  |
|--------------------------------+--------------------------------+
|   Stack buffer                 |   Breakpoints buffer           |
+--------------------------------+--------------------------------+

However, if gdb-use-separate-io-buffer is nil, the I/O buffer does not appear and the primary source buffer occupies the full width of the frame.

If you change the window layout, for example, while editing and re-compiling your program, then you can restore this standard window layout with the command gdb-restore-windows.

To switch between this standard layout and a simple layout containing just the GUD buffer and a source file, type M-x gdb-many-windows.

You may also specify additional GDB-related buffers to display, either in the same frame or a different one. Select the buffers you want with the ‘GUD->GDB-windows’ and ‘GUD->GDB-Frames’ sub-menus. If the menu-bar is unavailable, type M-x gdb-display-buffertype-buffer or M-x gdb-frame-buffertype-buffer respectively, where buffertype is the relevant buffer type, such as ‘breakpoints’. Most of these buffers are read-only, and typing q in them kills them.

When you finish debugging, kill the GUD buffer with C-x k, which will also kill all the buffers associated with the session. However you need not do this if, after editing and re-compiling your source code within Emacs, you wish continue debugging. When you restart execution, GDB will automatically find your new executable. Keeping the GUD buffer has the advantage of keeping the shell history as well as GDB's breakpoints. You do need to check that the breakpoints in recently edited source files are still in the right places.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2017
Individual documents may contain additional copyright information.