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

32.6.2 Debugger Operation

Generally when you run a debugger with GUD, the debugger uses an Emacs buffer for its ordinary input and output. This is called the GUD buffer. Input and output from the program you are debugging also use this buffer. We call this text command mode. The GDB Graphical Interface can use further buffers (see section GDB Graphical Interface).

The debugger displays the source files of the program by visiting them in Emacs buffers. An arrow in the left fringe indicates the current execution line.(16) Moving point in this buffer does not move the arrow. The arrow is not part of the file's text; it appears only on the screen.

You can start editing these source files at any time in the buffers that display them. If you do modify a source file, keep in mind that inserting or deleting lines will throw off the arrow's positioning; GUD has no way of figuring out which line corresponded before your changes to the line number in a debugger message. Also, you'll typically have to recompile and restart the program for your changes to be reflected in the debugger's tables.

The Tooltip facility (see section Tooltips) provides support for GUD. You activate this feature by turning on the minor mode gud-tooltip-mode. Then you can display a variable's value in a tooltip simply by pointing at it with the mouse. This operates in the GUD buffer and in source buffers with major modes in the list gud-tooltip-modes. If the variable gud-tooltip-echo-area is non-nil then the variable's value is displayed in the echo area. When debugging a C program using the GDB Graphical Interface, you can also display macro definitions associated with an identifier when the program is not executing.

GUD tooltips are disabled when you use GDB in text command mode (see section GDB Graphical Interface), because displaying an expression's value in GDB can sometimes expand a macro and result in a side effect that interferes with the program's operation. The GDB graphical interface supports GUD tooltips and assures they will not cause side effects.


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