diff options
| author | Nick Roberts | 2005-01-31 21:20:35 +0000 |
|---|---|---|
| committer | Nick Roberts | 2005-01-31 21:20:35 +0000 |
| commit | 31b4c1b7a101afa85b596b26239b4f8509bdb7df (patch) | |
| tree | 97b1f2e338388f4d63a07163c0cab39c4bf6df33 | |
| parent | 0978d7380499b7468e6f9ae03a90882045121b83 (diff) | |
| download | emacs-31b4c1b7a101afa85b596b26239b4f8509bdb7df.tar.gz emacs-31b4c1b7a101afa85b596b26239b4f8509bdb7df.zip | |
Update documentation relating to GDB Graphical
Interface.
| -rw-r--r-- | man/building.texi | 82 |
1 files changed, 53 insertions, 29 deletions
diff --git a/man/building.texi b/man/building.texi index cd42a4ef79d..3cb0e929ec0 100644 --- a/man/building.texi +++ b/man/building.texi | |||
| @@ -309,12 +309,13 @@ Emacs. @xref{MS-DOS}. | |||
| 309 | 309 | ||
| 310 | @c Do you believe in GUD? | 310 | @c Do you believe in GUD? |
| 311 | The GUD (Grand Unified Debugger) library provides an interface to | 311 | The GUD (Grand Unified Debugger) library provides an interface to |
| 312 | various symbolic debuggers from within Emacs. We recommend the debugger | 312 | various symbolic debuggers from within Emacs. We recommend the |
| 313 | GDB, which is free software, but you can also run DBX, SDB or XDB if you | 313 | debugger GDB, which is free software, but you can also run DBX, SDB or |
| 314 | have them. GUD can also serve as an interface to Perl's debugging | 314 | XDB if you have them. GUD can also serve as an interface to Perl's |
| 315 | mode, the Python debugger PDB, and to JDB, the Java Debugger. | 315 | debugging mode, the Python debugger PDB, the bash debugger, and to |
| 316 | @xref{Debugging,, The Lisp Debugger, elisp, the Emacs Lisp Reference Manual}, | 316 | JDB, the Java Debugger. @xref{Debugging,, The Lisp Debugger, elisp, |
| 317 | for information on debugging Emacs Lisp programs. | 317 | the Emacs Lisp Reference Manual}, for information on debugging Emacs |
| 318 | Lisp programs. | ||
| 318 | 319 | ||
| 319 | @menu | 320 | @menu |
| 320 | * Starting GUD:: How to start a debugger subprocess. | 321 | * Starting GUD:: How to start a debugger subprocess. |
| @@ -336,15 +337,14 @@ to a particular debugger program. | |||
| 336 | @table @kbd | 337 | @table @kbd |
| 337 | @item M-x gdb @key{RET} @var{file} @key{RET} | 338 | @item M-x gdb @key{RET} @var{file} @key{RET} |
| 338 | @findex gdb | 339 | @findex gdb |
| 339 | Run GDB as a subprocess of Emacs. If the variable | 340 | Run GDB as a subprocess of Emacs. By default, GDB starts as for |
| 340 | @code{gud-gdb-command-name} is ``gdb --annotate=3'' (the default | 341 | @kbd{M-x gdba} below. If you want GDB to start as in Emacs 21.3 and |
| 341 | value) then GDB starts as for @kbd{M-x gdba} below. If you want GDB | 342 | earlier then edit the string in the minibuffer or set |
| 342 | to start as in Emacs 21.3 and earlier then edit the string in the | 343 | @code{gud-gdb-command-name} to ``gdb --fullname''. You need to do |
| 343 | minibuffer or set @code{gud-gdb-command-name} to ``gdb --fullname''. | 344 | this if you want to run multiple debugging sessions within one Emacs |
| 344 | You need to do this if you want to run multiple debugging sessions | 345 | session. In this case, the command creates a buffer for input and |
| 345 | within one Emacs session. In this case, the command creates a buffer | 346 | output to GDB, and switches to it. If a GDB buffer already exists, it |
| 346 | for input and output to GDB, and switches to it. If a GDB buffer | 347 | just switches to that buffer. |
| 347 | already exists, it just switches to that buffer. | ||
| 348 | 348 | ||
| 349 | @item M-x gdba @key{RET} @var{file} @key{RET} | 349 | @item M-x gdba @key{RET} @var{file} @key{RET} |
| 350 | Run GDB as a subprocess of Emacs, providing a graphical interface | 350 | Run GDB as a subprocess of Emacs, providing a graphical interface |
| @@ -569,11 +569,13 @@ be bizarre. See the GDB manual entry regarding @code{jump} for | |||
| 569 | details. | 569 | details. |
| 570 | @end table | 570 | @end table |
| 571 | 571 | ||
| 572 | If you started GDB with the command @code{gdba}, you can click | 572 | With the GDB Graphical Interface, you can click @kbd{Mouse-1} on a |
| 573 | @kbd{Mouse-1} on a line of the source buffer, in the fringe or display | 573 | line of the source buffer, in the fringe or display margin, to set a |
| 574 | margin, to set a breakpoint there. If a breakpoint already exists on | 574 | breakpoint there. If a breakpoint already exists on that line, this |
| 575 | that line, this action will remove it. | 575 | action will remove it (@code{gdb-mouse-set-clear-breakpoint}). Where |
| 576 | (@code{gdb-mouse-toggle-breakpoint}). | 576 | Emacs uses the margin to display breakpoints, it is also possible to |
| 577 | enable or disable them when you click @kbd{Mouse-3} there | ||
| 578 | (@code{gdb-mouse-toggle--breakpoint}). | ||
| 577 | 579 | ||
| 578 | These commands interpret a numeric argument as a repeat count, when | 580 | These commands interpret a numeric argument as a repeat count, when |
| 579 | that makes sense. | 581 | that makes sense. |
| @@ -661,19 +663,23 @@ customizable list @code{tooltip-gud-modes}. | |||
| 661 | @node GDB Graphical Interface | 663 | @node GDB Graphical Interface |
| 662 | @subsection GDB Graphical Interface | 664 | @subsection GDB Graphical Interface |
| 663 | 665 | ||
| 666 | By default, the command @code{gdb} starts GDB using a graphical | ||
| 667 | interface where you view and control the program's data using Emacs | ||
| 668 | windows. You can still interact with GDB through the GUD buffer, but | ||
| 669 | the point of this mode is that you can do it through menus and clicks, | ||
| 670 | without needing to know GDB commands. | ||
| 671 | |||
| 664 | @findex gdba | 672 | @findex gdba |
| 665 | The command @code{gdba} starts GDB using a graphical interface where | 673 | If you have customised @code{gud-gdb-command-name}, then start this |
| 666 | you view and control the program's data using Emacs windows. You can | 674 | mode with the command @code{gdba}. |
| 667 | still interact with GDB through the GUD buffer, but the point of this | ||
| 668 | mode is that you can do it through menus and clicks, without needing | ||
| 669 | to know GDB commands. | ||
| 670 | 675 | ||
| 671 | @menu | 676 | @menu |
| 672 | * Layout:: Control the number of displayed buffers. | 677 | * Layout:: Control the number of displayed buffers. |
| 673 | * Breakpoints Buffer:: A breakpoint control panel. | 678 | * Breakpoints Buffer:: A breakpoint control panel. |
| 674 | * Stack Buffer:: Select a frame from the call stack. | 679 | * Stack Buffer:: Select a frame from the call stack. |
| 675 | * Watch Expressions:: Monitor variable values in the speedbar. | 680 | * Watch Expressions:: Monitor variable values in the speedbar. |
| 676 | * Other Buffers:: Input/output, locals, registers and assembler buffers. | 681 | * Other Buffers:: Input/output, locals, registers, assembler, threads |
| 682 | and memory buffers. | ||
| 677 | @end menu | 683 | @end menu |
| 678 | 684 | ||
| 679 | @node Layout | 685 | @node Layout |
| @@ -722,6 +728,15 @@ gdb-display-@var{buffertype}-buffer} or @code{M-x | |||
| 722 | gdb-frame-@var{buffertype}-buffer} respectively, where @var{buffertype} | 728 | gdb-frame-@var{buffertype}-buffer} respectively, where @var{buffertype} |
| 723 | is the relevant buffer type e.g breakpoints. | 729 | is the relevant buffer type e.g breakpoints. |
| 724 | 730 | ||
| 731 | When you finish debugging then kill the GUD buffer with @kbd{C-x k}, | ||
| 732 | which will also kill all the buffers associated with the session. | ||
| 733 | However you need not do this if, after editing and re-compiling your | ||
| 734 | source code within Emacs, you wish continue debugging. When you | ||
| 735 | restart execution, GDB will automatically find your new executable. | ||
| 736 | Keeping the GUD buffer has the advantage of keeping the shell history | ||
| 737 | as well as GDB's breakpoints. You need to check, however, that the | ||
| 738 | breakpoints in the recently edited code are still where you want them. | ||
| 739 | |||
| 725 | @node Breakpoints Buffer | 740 | @node Breakpoints Buffer |
| 726 | @subsubsection Breakpoints Buffer | 741 | @subsubsection Breakpoints Buffer |
| 727 | 742 | ||
| @@ -827,18 +842,27 @@ The registers buffer displays the values held by the registers | |||
| 827 | @item Assembler Buffer | 842 | @item Assembler Buffer |
| 828 | The assembler buffer displays the current frame as machine code. An | 843 | The assembler buffer displays the current frame as machine code. An |
| 829 | overlay arrow points to the current instruction and you can set and | 844 | overlay arrow points to the current instruction and you can set and |
| 830 | remove breakpoints as with the source buffer. Breakpoints also | 845 | remove breakpoints as with the source buffer. Breakpoint icons also |
| 831 | appear in the margin. | 846 | appear in the fringe or margin. |
| 832 | 847 | ||
| 833 | @item Threads Buffer | 848 | @item Threads Buffer |
| 834 | 849 | ||
| 835 | The threads buffer displays a summary of all threads currently in your | 850 | The threads buffer displays a summary of all threads currently in your |
| 836 | program.(@pxref{Threads,,, gdb, The GNU debugger}). Move point to | 851 | program (@pxref{Threads,,, gdb, The GNU debugger}). Move point to |
| 837 | any thread in the list and type @key{RET} to make it become the | 852 | any thread in the list and type @key{RET} to make it become the |
| 838 | current thread (@code{gdb-threads-select}) and display the associated | 853 | current thread (@code{gdb-threads-select}) and display the associated |
| 839 | source in the source buffer. Alternatively, click @kbd{Mouse-2} to | 854 | source in the source buffer. Alternatively, click @kbd{Mouse-2} to |
| 840 | make the selected thread become the current one. | 855 | make the selected thread become the current one. |
| 841 | 856 | ||
| 857 | @item Memory Buffer | ||
| 858 | |||
| 859 | The memory buffer allows the user to examine sections of program | ||
| 860 | memory (@pxref{Memory,,, gdb, The GNU debugger}). Click @kbd{Mouse-1} | ||
| 861 | on the appropriate part of the header line to change the starting | ||
| 862 | address or number of data items that the buffer displays. | ||
| 863 | Click @kbd{Mouse-3} on the header line to select the display format | ||
| 864 | or unit size for these data items. | ||
| 865 | |||
| 842 | @end table | 866 | @end table |
| 843 | 867 | ||
| 844 | @node Executing Lisp | 868 | @node Executing Lisp |