diff options
| author | Richard M. Stallman | 2003-05-28 11:42:49 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-05-28 11:42:49 +0000 |
| commit | f9ad161b282e67373227d6ed2d1604b6a18d2ec2 (patch) | |
| tree | a5dff29bf302b22e456e5741d836d198c5e9ee27 | |
| parent | 45f266dcb548c1e57a3132347329f2b56cd17f43 (diff) | |
| download | emacs-f9ad161b282e67373227d6ed2d1604b6a18d2ec2.tar.gz emacs-f9ad161b282e67373227d6ed2d1604b6a18d2ec2.zip | |
(GDB Graphical Interface): New node (rewritten somewhat by RMS).
| -rw-r--r-- | man/ChangeLog | 5 | ||||
| -rw-r--r-- | man/building.texi | 204 |
2 files changed, 209 insertions, 0 deletions
diff --git a/man/ChangeLog b/man/ChangeLog index 1f52a603228..9170a4912e0 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2003-05-28 Nick Roberts <nick@nick.uklinux.net> | ||
| 2 | |||
| 3 | * building.texi (GDB Graphical Interface): New node. | ||
| 4 | (Rewritten somewhat by RMS.) | ||
| 5 | |||
| 1 | 2003-05-28 Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> | 6 | 2003-05-28 Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> |
| 2 | 7 | ||
| 3 | * custom.texi (Init Rebinding): Xref Non-ASCII Rebinding, for | 8 | * custom.texi (Init Rebinding): Xref Non-ASCII Rebinding, for |
diff --git a/man/building.texi b/man/building.texi index 8169b64a1bf..e9dd079ccd9 100644 --- a/man/building.texi +++ b/man/building.texi | |||
| @@ -288,6 +288,9 @@ for information on debugging Emacs Lisp programs. | |||
| 288 | * Commands of GUD:: Key bindings for common commands. | 288 | * Commands of GUD:: Key bindings for common commands. |
| 289 | * GUD Customization:: Defining your own commands for GUD. | 289 | * GUD Customization:: Defining your own commands for GUD. |
| 290 | * GUD Tooltips:: Showing variable values by pointing with the mouse. | 290 | * GUD Tooltips:: Showing variable values by pointing with the mouse. |
| 291 | * GDB Graphical Interface:: An enhanced mode that uses GDB features to | ||
| 292 | implement a graphical debugging environment through | ||
| 293 | Emacs. | ||
| 291 | @end menu | 294 | @end menu |
| 292 | 295 | ||
| 293 | @node Starting GUD | 296 | @node Starting GUD |
| @@ -303,6 +306,10 @@ Run GDB as a subprocess of Emacs. This command creates a buffer | |||
| 303 | for input and output to GDB, and switches to it. If a GDB buffer | 306 | for input and output to GDB, and switches to it. If a GDB buffer |
| 304 | already exists, it just switches to that buffer. | 307 | already exists, it just switches to that buffer. |
| 305 | 308 | ||
| 309 | @item M-x gdba @key{RET} @var{file} @key{RET} | ||
| 310 | Run GDB as a subprocess of Emacs, providing a graphical interface | ||
| 311 | to GDB features through Emacs. @xref{GDB Graphical Interface}. | ||
| 312 | |||
| 306 | @item M-x dbx @key{RET} @var{file} @key{RET} | 313 | @item M-x dbx @key{RET} @var{file} @key{RET} |
| 307 | @findex dbx | 314 | @findex dbx |
| 308 | Similar, but run DBX instead of GDB. | 315 | Similar, but run DBX instead of GDB. |
| @@ -478,6 +485,21 @@ equivalent to the @samp{down} command. | |||
| 478 | If you are using GDB, these additional key bindings are available: | 485 | If you are using GDB, these additional key bindings are available: |
| 479 | 486 | ||
| 480 | @table @kbd | 487 | @table @kbd |
| 488 | @item C-c C-r | ||
| 489 | @kindex C-c C-r @r{(GUD)} | ||
| 490 | @itemx C-x C-a C-r | ||
| 491 | @findex gud-run | ||
| 492 | Start execution of the program (@code{gud-run}). | ||
| 493 | |||
| 494 | @item C-c C-u | ||
| 495 | @kindex C-c C-u @r{(GUD)} | ||
| 496 | @itemx C-x C-a C-u | ||
| 497 | @findex gud-until | ||
| 498 | Continue execution to the current line. The program will run until | ||
| 499 | it hits a breakpoint, terminates, gets a signal that the debugger is | ||
| 500 | checking for, or reaches the line on which the cursor currently sits | ||
| 501 | (@code{gud-until}). | ||
| 502 | |||
| 481 | @item @key{TAB} | 503 | @item @key{TAB} |
| 482 | @kindex TAB @r{(GUD)} | 504 | @kindex TAB @r{(GUD)} |
| 483 | @findex gud-gdb-complete-command | 505 | @findex gud-gdb-complete-command |
| @@ -587,6 +609,188 @@ variable values can be displayed in tooltips by pointing at them with | |||
| 587 | the mouse in the GUD buffer or in source buffers with major modes in the | 609 | the mouse in the GUD buffer or in source buffers with major modes in the |
| 588 | customizable list @code{tooltip-gud-modes}. | 610 | customizable list @code{tooltip-gud-modes}. |
| 589 | 611 | ||
| 612 | @node GDB Graphical Interface | ||
| 613 | @subsection GDB Graphical Interface | ||
| 614 | |||
| 615 | @findex gdba | ||
| 616 | The command @code{gdba} starts GDB using a graphical interface where | ||
| 617 | you view and control the program's data using Emacs windows. You can | ||
| 618 | still interact with GDB through the GUD buffer, but the point of this | ||
| 619 | mode is that you can do it through menus and clicks, without needing | ||
| 620 | to know GDB commands. | ||
| 621 | |||
| 622 | @menu | ||
| 623 | * Breakpoints Buffer:: A breakpoint control panel. | ||
| 624 | * Stack Buffer:: Select a frame from the call stack. | ||
| 625 | * Data Display:: Display and update expressions in their own buffer. | ||
| 626 | * Display Buffer:: Control the displayed expressions. | ||
| 627 | * Other Buffers:: Input/output, locals, registers and assembler buffers. | ||
| 628 | * Layout:: Control the number of displayed buffers. | ||
| 629 | @end menu | ||
| 630 | |||
| 631 | @node Breakpoints Buffer | ||
| 632 | @subsubsection Breakpoints Buffer | ||
| 633 | |||
| 634 | The breakpoints buffer shows the existing breakpoints and watchpoints | ||
| 635 | (@pxref{Breakpoints,,, gdb, The GNU debugger}). It has three special | ||
| 636 | commands: | ||
| 637 | |||
| 638 | @table @kbd | ||
| 639 | @item @key{SPC} | ||
| 640 | @kindex SPC @r{(GDB breakpoints buffer)} | ||
| 641 | @findex gdb-toggle-breakpoint | ||
| 642 | Enable/disable the breakpoint at the current line | ||
| 643 | (@code{gdb-toggle-breakpoint}). On a graphical display, this changes | ||
| 644 | the color of a bullet in the margin of the source buffer at the | ||
| 645 | relevant line. This is red when the breakpoint is enabled and grey | ||
| 646 | when it is disabled. Text-only terminals correspondingly display | ||
| 647 | a @samp{B} or @samp{b}. | ||
| 648 | |||
| 649 | @item @kbd{d} | ||
| 650 | @kindex d @r{(GDB breakpoints buffer)} | ||
| 651 | @findex gdb-delete-breakpoint | ||
| 652 | Delete the breakpoint at the current line (@code{gdb-delete-breakpoint}). | ||
| 653 | |||
| 654 | @item @key{RET} | ||
| 655 | @kindex RET @r{(GDB breakpoints buffer)} | ||
| 656 | @findex gdb-goto-breakpoint | ||
| 657 | Display the file in the source buffer at the breakpoint specified at | ||
| 658 | the current line (@code{gdb-goto-breakpoint}). Alternatively, click @kbd{Mouse-2} on the breakpoint that you wish to visit. | ||
| 659 | @end table | ||
| 660 | |||
| 661 | @node Stack Buffer | ||
| 662 | @subsubsection Stack Buffer | ||
| 663 | |||
| 664 | The stack buffer displays a @dfn{call stack}, with one line for each | ||
| 665 | of the nested subroutine calls (@dfn{stack frames}) now active in the | ||
| 666 | program. @xref{Backtrace,,info stack, gdb, The GNU debugger}. | ||
| 667 | |||
| 668 | Move point to any frame in the stack and type @key{RET} to make it | ||
| 669 | become the current frame (@code{gdb-frames-select}) and display the | ||
| 670 | associated source in the source buffer. Alternatively, click | ||
| 671 | @kbd{Mouse-2} to make the selected frame become the current one. If the | ||
| 672 | locals buffer is displayed then its contents update to display the | ||
| 673 | variables that are local to the new frame. | ||
| 674 | |||
| 675 | @node Data Display | ||
| 676 | @subsubsection Data Display | ||
| 677 | @cindex displaying expressions in GDB | ||
| 678 | |||
| 679 | If you want to see how a variable changes each time your program stops | ||
| 680 | then place the cursor over the variable name and click on the display | ||
| 681 | icon in the toolbar (@code{gud-display}). | ||
| 682 | |||
| 683 | Each displayed expression has its own frame on a graphical display and | ||
| 684 | its own buffer on a text-only terminal. Arrays and structures have | ||
| 685 | their own display formats. To display an array as a slice, at the top | ||
| 686 | of the display window, click @kbd{Mouse-2} on the array index that you | ||
| 687 | want to restrict and you will be prompted in the mini-buffer for a | ||
| 688 | start and a stop value. Click @kbd{Mouse-2} on a pointer to | ||
| 689 | dereference it in the same frame/buffer. Click @kbd{S-Mouse-2} there | ||
| 690 | to do the same thing but in a new frame/buffer. There are two special | ||
| 691 | commands for these buffers: | ||
| 692 | |||
| 693 | @table @kbd | ||
| 694 | @item @kbd{v} | ||
| 695 | @kindex v @r{(GDB data buffer)} | ||
| 696 | @findex gdb-array-visualise | ||
| 697 | Visualise an array using the graph program from plotutils if this is | ||
| 698 | installed. This only works for one dimensional arrays | ||
| 699 | (@code{gdb-array-visualise}). | ||
| 700 | |||
| 701 | @item @kbd{q} | ||
| 702 | @kindex q @r{(GDB data buffer)} | ||
| 703 | @findex gdb-delete-expression | ||
| 704 | Delete the displayed expression and the associated frame | ||
| 705 | (@code{gdb-delete-expression}). | ||
| 706 | @end table | ||
| 707 | |||
| 708 | @node Display Buffer | ||
| 709 | @subsubsection Display Buffer | ||
| 710 | |||
| 711 | The display buffer shows the list of displayed expressions | ||
| 712 | (@pxref{Auto Display,,, gdb, The GNU debugger}). As with the | ||
| 713 | breakpoints, you can enable/disable or delete the displayed | ||
| 714 | expressions: | ||
| 715 | |||
| 716 | @table @kbd | ||
| 717 | @item @key{SPC} | ||
| 718 | @kindex SPC @r{(GDB display buffer)} | ||
| 719 | @findex gdb-toggle-display | ||
| 720 | Enable/disable the display at the current line | ||
| 721 | (@code{gdb-toggle-display}). | ||
| 722 | |||
| 723 | @item @kbd{d} | ||
| 724 | @kindex d @r{(GDB display buffer)} | ||
| 725 | @findex gdb-delete-display | ||
| 726 | Delete the display at the current line (@code{gdb-delete-display}). | ||
| 727 | @end table | ||
| 728 | |||
| 729 | @node Other Buffers | ||
| 730 | @subsubsection Other Buffers | ||
| 731 | |||
| 732 | @table @asis | ||
| 733 | @item Input/Output Buffer | ||
| 734 | The executable program that is being debugged takes its input and | ||
| 735 | displays its output here. Some of the commands from shell mode are | ||
| 736 | available here. @xref{Shell Mode}. | ||
| 737 | |||
| 738 | @item Locals Buffer | ||
| 739 | The locals buffer displays the values of local variables of the | ||
| 740 | current frame for simple data types (@pxref{Frame Info,,, gdb, The GNU | ||
| 741 | debugger}). | ||
| 742 | |||
| 743 | Arrays and structures display their type only. You must display them | ||
| 744 | separately to examine their values. @ref{Data Display}. | ||
| 745 | |||
| 746 | @item Registers Buffer | ||
| 747 | The registers buffer displays the values held by the registers | ||
| 748 | (@pxref{Registers,,, gdb, The GNU debugger}). | ||
| 749 | |||
| 750 | @item Assembler Buffer | ||
| 751 | The assembler buffer displays the current frame as machine code. An | ||
| 752 | overlay arrow points to the current instruction and you can set and | ||
| 753 | remove breakpoints as with the source buffer. Breakpoints also | ||
| 754 | appear in the margin. | ||
| 755 | @end table | ||
| 756 | |||
| 757 | @node Layout | ||
| 758 | @subsubsection Layout | ||
| 759 | @cindex GDB User Interface layout | ||
| 760 | You may choose to display the additional buffers described previously | ||
| 761 | either in the same frame or a different one. Select GDB-windows or | ||
| 762 | GDB-Frames from the menu-bar under the heading GUD. If the menu-bar | ||
| 763 | is unavailable, type @code{M-x | ||
| 764 | gdb-display-@var{buffertype}-buffer} or @code{M-x | ||
| 765 | gdb-frame-@var{buffertype}-buffer} respectively, where @var{buffertype} | ||
| 766 | is the relevant buffer type e.g breakpoints. | ||
| 767 | |||
| 768 | @findex gdb-many-windows | ||
| 769 | @vindex gdb-many-windows | ||
| 770 | If @code{gdb-many-windows} is @code{nil} (the default value), then GDB starts | ||
| 771 | with just two windows: the GUD and the source buffer. If it is @code{t}, then | ||
| 772 | six windows with the following layout will appear: | ||
| 773 | |||
| 774 | @multitable @columnfractions .5 .5 | ||
| 775 | @item GUD buffer (I/O of GDB) | ||
| 776 | @tab Locals buffer | ||
| 777 | @item | ||
| 778 | @tab | ||
| 779 | @item Source buffer | ||
| 780 | @tab Input/Output (of debuggee) buffer | ||
| 781 | @item | ||
| 782 | @tab | ||
| 783 | @item Stack buffer | ||
| 784 | @tab Breakpoints buffer | ||
| 785 | @end multitable | ||
| 786 | |||
| 787 | To toggle this layout, do @kbd{M-x gdb-many-windows}. | ||
| 788 | |||
| 789 | @findex gdb-restore-windows | ||
| 790 | If you change the window layout, for example, while editing and | ||
| 791 | re-compiling your program, then you can restore it with | ||
| 792 | @code{gdb-restore-windows}. | ||
| 793 | |||
| 590 | @node Executing Lisp | 794 | @node Executing Lisp |
| 591 | @section Executing Lisp Expressions | 795 | @section Executing Lisp Expressions |
| 592 | 796 | ||