comparison man/building.texi @ 74192:57a2cb9d5be2

(Debugger Operation): Define text command mode. Clarify how tooltips work. (GDB Graphical Interface): Explain how to run in text command mode more clearly.
author Nick Roberts <nickrob@snap.net.nz>
date Sun, 26 Nov 2006 08:37:07 +0000
parents c1e1c7527b1a
children e80343741269
comparison
equal deleted inserted replaced
74191:c155da9f72bb 74192:57a2cb9d5be2
534 534
535 @node Debugger Operation 535 @node Debugger Operation
536 @subsection Debugger Operation 536 @subsection Debugger Operation
537 537
538 @cindex fringes, and current execution line in GUD 538 @cindex fringes, and current execution line in GUD
539 When you run a debugger with GUD using the textual interface, the 539 Generally when you run a debugger with GUD, the debugger uses an Emacs
540 debugger uses an Emacs buffer for its ordinary input and output. This 540 buffer for its ordinary input and output. This is called the GUD
541 is called the GUD buffer. Input and output from the program you are 541 buffer. Input and output from the program you are debugging also use
542 debugging also use this buffer. 542 this buffer. We call this @dfn{text command mode}. The GDB Graphical
543 Interface can use further buffers (@pxref{GDB Graphical Interface}).
543 544
544 The debugger displays the source files of the program by visiting 545 The debugger displays the source files of the program by visiting
545 them in Emacs buffers. An arrow in the left fringe indicates the 546 them in Emacs buffers. An arrow in the left fringe indicates the
546 current execution line.@footnote{On a text-only terminal, the arrow 547 current execution line.@footnote{On a text-only terminal, the arrow
547 appears as @samp{=>} and overlays the first two text columns.} Moving 548 appears as @samp{=>} and overlays the first two text columns.} Moving
561 @vindex gud-tooltip-mode 562 @vindex gud-tooltip-mode
562 @vindex gud-tooltip-echo-area 563 @vindex gud-tooltip-echo-area
563 The Tooltip facility (@pxref{Tooltips}) provides support for GUD@. 564 The Tooltip facility (@pxref{Tooltips}) provides support for GUD@.
564 You activate this feature by turning on the minor mode 565 You activate this feature by turning on the minor mode
565 @code{gud-tooltip-mode}. Then you can display a variable's value in a 566 @code{gud-tooltip-mode}. Then you can display a variable's value in a
566 tooltip simply by pointing at it with the mouse. In graphical mode, 567 tooltip simply by pointing at it with the mouse. This operates in the
567 with a C program, you can also display the @code{#define} directive 568 GUD buffer and in source buffers with major modes in the list
568 associated with an identifier when the program is not executing. This 569 @code{gud-tooltip-modes}. If the variable @code{gud-tooltip-echo-area}
569 operates in the GUD buffer and in source buffers with major modes in 570 is non-@code{nil} then the variable's value is displayed in the echo
570 the list @code{gud-tooltip-modes}. If the variable 571 area. When debugging a C program using the GDB Graphical Interface, you
571 @code{gud-tooltip-echo-area} is non-@code{nil} then the variable's 572 can also display macro definitions associated with an identifier when
572 value is displayed in the echo area. 573 the program is not executing.
573 574
574 GUD tooltips are disabled when you use GDB in text command mode 575 GUD tooltips are disabled when you use GDB in text command mode
575 (@pxref{GDB Graphical Interface}), because displaying an expression's 576 (@pxref{GDB Graphical Interface}), because displaying an expression's
576 value in GDB can sometimes expand a macro and result in a side effect 577 value in GDB can sometimes expand a macro and result in a side effect
577 that interferes with the program's operation. The GDB graphical 578 that interferes with the program's operation. The GDB graphical
826 operation you must not change these values during the GDB session. 827 operation you must not change these values during the GDB session.
827 828
828 @vindex gud-gdb-command-name 829 @vindex gud-gdb-command-name
829 @findex gdba 830 @findex gdba
830 You can also run GDB in text command mode, like other debuggers. To 831 You can also run GDB in text command mode, like other debuggers. To
831 do this, set @code{gud-gdb-command-name} to @code{"gdb --fullname"} or 832 do this, replace the GDB @code{"--annotate=3"} option with
832 edit the startup command in the minibuffer to say that. You need to 833 @code{"--fullname"} either in the minibuffer for the current Emacs
833 do use text command mode to run multiple debugging sessions within one 834 session, or the custom variable @code{gud-gdb-command-name} for all
834 Emacs session. If you have customized @code{gud-gdb-command-name} in 835 future sessions. You need to use text command mode to debug multiple
835 that way, you can use @kbd{M-x gdba} to invoke GDB in graphical mode. 836 programs within one Emacs session. If you have customized
837 @code{gud-gdb-command-name} in this way, you can use @kbd{M-x gdba} to
838 invoke GDB in graphical mode.
836 839
837 @menu 840 @menu
838 * GDB-UI Layout:: Control the number of displayed buffers. 841 * GDB-UI Layout:: Control the number of displayed buffers.
839 * Source Buffers:: Use the mouse in the fringe/margin to 842 * Source Buffers:: Use the mouse in the fringe/margin to
840 control your program. 843 control your program.