325 |
* Debugger Operation:: Connection between the debugger and source buffers. |
* Debugger Operation:: Connection between the debugger and source buffers. |
326 |
* Commands of GUD:: Key bindings for common commands. |
* Commands of GUD:: Key bindings for common commands. |
327 |
* GUD Customization:: Defining your own commands for GUD. |
* GUD Customization:: Defining your own commands for GUD. |
|
* GUD Tooltips:: Showing variable values by pointing with the mouse. |
|
328 |
* GDB Graphical Interface:: An enhanced mode that uses GDB features to |
* GDB Graphical Interface:: An enhanced mode that uses GDB features to |
329 |
implement a graphical debugging environment through |
implement a graphical debugging environment through |
330 |
Emacs. |
Emacs. |
339 |
@table @kbd |
@table @kbd |
340 |
@item M-x gdb @key{RET} @var{file} @key{RET} |
@item M-x gdb @key{RET} @var{file} @key{RET} |
341 |
@findex gdb |
@findex gdb |
342 |
Run GDB as a subprocess of Emacs. By default, GDB starts as for |
Run GDB as a subprocess of Emacs. By default, this operates in |
343 |
@kbd{M-x gdba} below. If you want GDB to start as in Emacs 21.3 and |
graphical mode; @xref{GDB Graphical Interface}. Graphical mode |
344 |
earlier then edit the string in the minibuffer or set |
does not support any other debuggers. |
|
@code{gud-gdb-command-name} to ``gdb --fullname''. You need to do |
|
|
this if you want to run multiple debugging sessions within one Emacs |
|
|
session. In this case, the command creates a buffer for input and |
|
|
output to GDB, and switches to it. If a GDB buffer already exists, it |
|
|
just switches to that buffer. |
|
|
|
|
|
@item M-x gdba @key{RET} @var{file} @key{RET} |
|
|
Run GDB as a subprocess of Emacs, providing a graphical interface |
|
|
to GDB features through Emacs. @xref{GDB Graphical Interface}. |
|
345 |
|
|
346 |
@item M-x dbx @key{RET} @var{file} @key{RET} |
@item M-x dbx @key{RET} @var{file} @key{RET} |
347 |
@findex dbx |
@findex dbx |
386 |
allowed. GUD assumes that the first argument not starting with a |
allowed. GUD assumes that the first argument not starting with a |
387 |
@samp{-} is the executable file name. |
@samp{-} is the executable file name. |
388 |
|
|
|
Emacs can only run one debugger process at a time. |
|
|
|
|
389 |
@node Debugger Operation |
@node Debugger Operation |
390 |
@subsection Debugger Operation |
@subsection Debugger Operation |
391 |
|
|
412 |
commands for your debugger are available, and you can use the Shell mode |
commands for your debugger are available, and you can use the Shell mode |
413 |
history commands to repeat them. @xref{Shell Mode}. |
history commands to repeat them. @xref{Shell Mode}. |
414 |
|
|
415 |
|
@cindex tooltips with GUD |
416 |
|
@vindex tooltip-gud-modes |
417 |
|
The Tooltip facility (@pxref{Tooltips}) provides support for GUD@. |
418 |
|
You activate this feature by customizing the @code{tooltip} group. |
419 |
|
Then you can display a variable's value in a tooltip simply by |
420 |
|
pointing at it with the mouse. This operates in the GUD buffer and in |
421 |
|
source buffers with major modes in the list @code{tooltip-gud-modes}. |
422 |
|
|
423 |
@node Commands of GUD |
@node Commands of GUD |
424 |
@subsection Commands of GUD |
@subsection Commands of GUD |
425 |
|
|
649 |
ignores any numeric argument. |
ignores any numeric argument. |
650 |
@end table |
@end table |
651 |
|
|
|
@node GUD Tooltips |
|
|
@subsection GUD Tooltips |
|
|
|
|
|
@cindex tooltips with GUD |
|
|
The Tooltip facility (@pxref{Tooltips}) provides support for GUD@. If |
|
|
GUD support is activated by customizing the @code{tooltip} group, |
|
|
variable values can be displayed in tooltips by pointing at them with |
|
|
the mouse in the GUD buffer or in source buffers with major modes in the |
|
|
customizable list @code{tooltip-gud-modes}. |
|
|
|
|
652 |
@node GDB Graphical Interface |
@node GDB Graphical Interface |
653 |
@subsection GDB Graphical Interface |
@subsection GDB Graphical Interface |
654 |
|
|
655 |
By default, the command @code{gdb} starts GDB using a graphical |
By default, the command @code{gdb} starts GDB using a graphical |
656 |
interface where you view and control the program's data using Emacs |
interface where you view and control the program's data using Emacs |
657 |
windows. You can still interact with GDB through the GUD buffer, but |
windows. You can still interact with GDB through the GUD buffer, but |
658 |
the point of this mode is that you can do it through menus and clicks, |
the point of this mode is that you can do it through menus and clicks, |
659 |
without needing to know GDB commands. |
without needing to know GDB commands. |
660 |
|
|
661 |
|
@vindex gud-gdb-command-name |
662 |
@findex gdba |
@findex gdba |
663 |
If you have customised @code{gud-gdb-command-name}, then start this |
You can also run GDB in text command mode, which creates a buffer |
664 |
mode with the command @code{gdba}. |
for input and output to GDB. To do this, set |
665 |
|
@code{gud-gdb-command-name} to @code{"gdb --fullname"} or edit the |
666 |
|
startup command in the minibuffer to say that. You need to do use |
667 |
|
text command mode to run multiple debugging sessions within one Emacs |
668 |
|
session. If you have customised @code{gud-gdb-command-name} in that |
669 |
|
way, then you can use @kbd{M-x gdba} to invoke GDB in graphical mode. |
670 |
|
|
671 |
@menu |
@menu |
672 |
* Layout:: Control the number of displayed buffers. |
* Layout:: Control the number of displayed buffers. |