comparison man/building.texi @ 55577:66ec9893d229

(GDB Graphical Interface): Update and describe layout first.
author Nick Roberts <nickrob@snap.net.nz>
date Thu, 13 May 2004 22:07:24 +0000
parents 6534ec3bbe32
children 8446511392c6
comparison
equal deleted inserted replaced
55576:77a79f33714b 55577:66ec9893d229
284 284
285 @c Do you believe in GUD? 285 @c Do you believe in GUD?
286 The GUD (Grand Unified Debugger) library provides an interface to 286 The GUD (Grand Unified Debugger) library provides an interface to
287 various symbolic debuggers from within Emacs. We recommend the debugger 287 various symbolic debuggers from within Emacs. We recommend the debugger
288 GDB, which is free software, but you can also run DBX, SDB or XDB if you 288 GDB, which is free software, but you can also run DBX, SDB or XDB if you
289 have them. GUD can also serve as an interface to the Perl's debugging 289 have them. GUD can also serve as an interface to Perl's debugging
290 mode, the Python debugger PDB, and to JDB, the Java Debugger. 290 mode, the Python debugger PDB, and to JDB, the Java Debugger.
291 @xref{Debugging,, The Lisp Debugger, elisp, the Emacs Lisp Reference Manual}, 291 @xref{Debugging,, The Lisp Debugger, elisp, the Emacs Lisp Reference Manual},
292 for information on debugging Emacs Lisp programs. 292 for information on debugging Emacs Lisp programs.
293 293
294 @menu 294 @menu
309 to a particular debugger program. 309 to a particular debugger program.
310 310
311 @table @kbd 311 @table @kbd
312 @item M-x gdb @key{RET} @var{file} @key{RET} 312 @item M-x gdb @key{RET} @var{file} @key{RET}
313 @findex gdb 313 @findex gdb
314 Run GDB as a subprocess of Emacs. This command creates a buffer 314 Run GDB as a subprocess of Emacs. If the variable
315 for input and output to GDB, and switches to it. If a GDB buffer 315 @code{gud-gdb-command-name} is ``gdb --annotate=3'' (the default
316 already exists, it just switches to that buffer. 316 value) then GDB starts as for @kbd{M-x gdba} below. If you want to
317 GDB to start as in Emacs 21.3 and earlier then set
318 @code{gud-gdb-command-name} to ``gdb --fullname''. In this case, the
319 command creates a buffer for input and output to GDB, and switches to
320 it. If a GDB buffer already exists, it just switches to that buffer.
317 321
318 @item M-x gdba @key{RET} @var{file} @key{RET} 322 @item M-x gdba @key{RET} @var{file} @key{RET}
319 Run GDB as a subprocess of Emacs, providing a graphical interface 323 Run GDB as a subprocess of Emacs, providing a graphical interface
320 to GDB features through Emacs. @xref{GDB Graphical Interface}. 324 to GDB features through Emacs. @xref{GDB Graphical Interface}.
321 325
636 still interact with GDB through the GUD buffer, but the point of this 640 still interact with GDB through the GUD buffer, but the point of this
637 mode is that you can do it through menus and clicks, without needing 641 mode is that you can do it through menus and clicks, without needing
638 to know GDB commands. 642 to know GDB commands.
639 643
640 @menu 644 @menu
645 * Layout:: Control the number of displayed buffers.
641 * Breakpoints Buffer:: A breakpoint control panel. 646 * Breakpoints Buffer:: A breakpoint control panel.
642 * Stack Buffer:: Select a frame from the call stack. 647 * Stack Buffer:: Select a frame from the call stack.
643 * Watch Expressions:: Monitor variable values in the speedbar. 648 * Watch Expressions:: Monitor variable values in the speedbar.
644 * Other Buffers:: Input/output, locals, registers and assembler buffers. 649 * Other Buffers:: Input/output, locals, registers and assembler buffers.
645 * Layout:: Control the number of displayed buffers.
646 @end menu 650 @end menu
651
652 @node Layout
653 @subsubsection Layout
654 @cindex GDB User Interface layout
655
656 @findex gdb-many-windows
657 @vindex gdb-many-windows
658
659 If the variable @code{gdb-many-windows} is @code{nil} (the default
660 value) then gdb just pops up the GUD buffer unless the variable
661 @code{gdb-show-main} is non-@code{nil}. In this case it starts with
662 two windows: one displaying the GUD buffer and the other with the
663 source file with the main routine of the inferior.
664
665 If @code{gdb-many-windows} is non-@code{nil}, regardless of the value of
666 @code{gdb-show-main}, the layout below will appear unless
667 @code{gdb-use-inferior-io-buffer} is @code{nil}. In this case the
668 source buffer occupies the full width of the frame.
669
670 @multitable @columnfractions .5 .5
671 @item GUD buffer (I/O of GDB)
672 @tab Locals buffer
673 @item
674 @tab
675 @item Source buffer
676 @tab Input/Output (of inferior) buffer
677 @item
678 @tab
679 @item Stack buffer
680 @tab Breakpoints buffer
681 @end multitable
682
683 To toggle this layout, do @kbd{M-x gdb-many-windows}.
684
685 @findex gdb-restore-windows
686 If you change the window layout, for example, while editing and
687 re-compiling your program, then you can restore it with the command
688 @code{gdb-restore-windows}.
689
690 You may also choose which additional buffers you want to display,
691 either in the same frame or a different one. Select GDB-windows or
692 GDB-Frames from the menu-bar under the heading GUD. If the menu-bar
693 is unavailable, type @code{M-x
694 gdb-display-@var{buffertype}-buffer} or @code{M-x
695 gdb-frame-@var{buffertype}-buffer} respectively, where @var{buffertype}
696 is the relevant buffer type e.g breakpoints.
647 697
648 @node Breakpoints Buffer 698 @node Breakpoints Buffer
649 @subsubsection Breakpoints Buffer 699 @subsubsection Breakpoints Buffer
650 700
651 The breakpoints buffer shows the existing breakpoints and watchpoints 701 The breakpoints buffer shows the existing breakpoints and watchpoints
703 on the tag to the left of the expression. 753 on the tag to the left of the expression.
704 754
705 @kindex RET @r{(GDB speedbar)} 755 @kindex RET @r{(GDB speedbar)}
706 @findex gdb-var-delete 756 @findex gdb-var-delete
707 With the cursor over the root expression of a complex data type, type 757 With the cursor over the root expression of a complex data type, type
708 @key{D} to delete it from the speedbar 758 @kbd{D} to delete it from the speedbar
709 (@code{gdb-var-delete}). 759 (@code{gdb-var-delete}).
710 760
711 @findex gdb-edit-value 761 @findex gdb-edit-value
712 With the cursor over a simple data type or an element of a complex 762 With the cursor over a simple data type or an element of a complex
713 data type which holds a value, type @key{RET} or click @kbd{Mouse-2} to edit 763 data type which holds a value, type @key{RET} or click @kbd{Mouse-2} to edit
728 @node Other Buffers 778 @node Other Buffers
729 @subsubsection Other Buffers 779 @subsubsection Other Buffers
730 780
731 @table @asis 781 @table @asis
732 @item Input/Output Buffer 782 @item Input/Output Buffer
733 The executable program that is being debugged takes its input and 783 If the variable @code{gdb-use-inferior-io-buffer} is non-@code{nil},
784 the executable program that is being debugged takes its input and
734 displays its output here. Some of the commands from shell mode are 785 displays its output here. Some of the commands from shell mode are
735 available here. @xref{Shell Mode}. 786 available here. @xref{Shell Mode}.
736 787
737 @item Locals Buffer 788 @item Locals Buffer
738 The locals buffer displays the values of local variables of the 789 The locals buffer displays the values of local variables of the
760 current thread (@code{gdb-threads-select}) and display the associated 811 current thread (@code{gdb-threads-select}) and display the associated
761 source in the source buffer. Alternatively, click @kbd{Mouse-2} to 812 source in the source buffer. Alternatively, click @kbd{Mouse-2} to
762 make the selected thread become the current one. 813 make the selected thread become the current one.
763 814
764 @end table 815 @end table
765
766 @node Layout
767 @subsubsection Layout
768 @cindex GDB User Interface layout
769
770 @findex gdb-many-windows
771 @vindex gdb-many-windows
772 If @code{gdb-many-windows} is @code{nil} (the default value), then GDB starts
773 with just two windows: the GUD and the source buffer. If it is @code{t}, then
774 six windows with the following layout will appear:
775
776 @multitable @columnfractions .5 .5
777 @item GUD buffer (I/O of GDB)
778 @tab Locals buffer
779 @item
780 @tab
781 @item Source buffer
782 @tab Input/Output (of debuggee) buffer
783 @item
784 @tab
785 @item Stack buffer
786 @tab Breakpoints buffer
787 @end multitable
788
789 To toggle this layout, do @kbd{M-x gdb-many-windows}.
790
791 @findex gdb-restore-windows
792 If you change the window layout, for example, while editing and
793 re-compiling your program, then you can restore it with
794 @code{gdb-restore-windows}.
795
796 You may also choose which additional buffers you want to display,
797 either in the same frame or a different one. Select GDB-windows or
798 GDB-Frames from the menu-bar under the heading GUD. If the menu-bar
799 is unavailable, type @code{M-x
800 gdb-display-@var{buffertype}-buffer} or @code{M-x
801 gdb-frame-@var{buffertype}-buffer} respectively, where @var{buffertype}
802 is the relevant buffer type e.g breakpoints.
803 816
804 @node Executing Lisp 817 @node Executing Lisp
805 @section Executing Lisp Expressions 818 @section Executing Lisp Expressions
806 819
807 Emacs has several different major modes for Lisp and Scheme. They are 820 Emacs has several different major modes for Lisp and Scheme. They are