Next: GUD Commands, Previous: Starting GUD, Up: GUD—Grand Unified Debugger Mode [Index]
The “GUD interaction buffer” is an Emacs buffer which is used to send text commands to a debugger subprocess, and record its output. This is the basic interface for interacting with a debugger, used by ‘M-x gud-gdb’ and other commands listed in *note Starting GUD.
The ‘M-x gdb’ command extends this interface with additional specialized buffers for controlling breakpoints, stack frames, and other aspects of the debugger state
The GUD interaction buffer uses a variant of Shell mode, so the Emacs commands defined by Shell mode are available. Completion is available for most debugger commands, and you can use the usual Shell mode history commands to repeat them. *Note Commands of GUD, for special commands that can be used in the GUD interaction buffer.
As you debug a program, Emacs displays the relevant source files by visiting them in Emacs buffers, with an arrow in the left fringe indicating the current execution line. (On a text terminal, the arrow appears as ‘=>’, overlaid on the first two text columns.) Moving point in such a buffer does not move the arrow. You are free to edit these source files, but note that inserting or deleting lines will throw off the arrow’s positioning, as Emacs has no way to figure out which edited source line corresponds to the line reported by the debugger subprocess. To update this information, you typically have to recompile and restart the program.
GUD Tooltip mode is a global minor mode that adds tooltip support to GUD. To toggle this mode, type ‘M-x gud-tooltip-mode’. It is disabled by default. If enabled, you can move the mouse pointer over a variable, a function, or a macro (collectively called “identifiers”) to show their values in tooltips . If just placing the mouse pointer over an expression doesn’t show the value of the expression you had in mind, you can tell Emacs more explicitly what expression to evaluate by dragging the mouse over the expression, then leaving the mouse inside the marked area.
Next: GUD Commands, Previous: Starting GUD, Up: GUD—Grand Unified Debugger Mode [Index]