aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Roberts2005-01-31 21:20:35 +0000
committerNick Roberts2005-01-31 21:20:35 +0000
commit31b4c1b7a101afa85b596b26239b4f8509bdb7df (patch)
tree97b1f2e338388f4d63a07163c0cab39c4bf6df33
parent0978d7380499b7468e6f9ae03a90882045121b83 (diff)
downloademacs-31b4c1b7a101afa85b596b26239b4f8509bdb7df.tar.gz
emacs-31b4c1b7a101afa85b596b26239b4f8509bdb7df.zip
Update documentation relating to GDB Graphical
Interface.
-rw-r--r--man/building.texi82
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?
311The GUD (Grand Unified Debugger) library provides an interface to 311The GUD (Grand Unified Debugger) library provides an interface to
312various symbolic debuggers from within Emacs. We recommend the debugger 312various symbolic debuggers from within Emacs. We recommend the
313GDB, which is free software, but you can also run DBX, SDB or XDB if you 313debugger GDB, which is free software, but you can also run DBX, SDB or
314have them. GUD can also serve as an interface to Perl's debugging 314XDB if you have them. GUD can also serve as an interface to Perl's
315mode, the Python debugger PDB, and to JDB, the Java Debugger. 315debugging mode, the Python debugger PDB, the bash debugger, and to
316@xref{Debugging,, The Lisp Debugger, elisp, the Emacs Lisp Reference Manual}, 316JDB, the Java Debugger. @xref{Debugging,, The Lisp Debugger, elisp,
317for information on debugging Emacs Lisp programs. 317the Emacs Lisp Reference Manual}, for information on debugging Emacs
318Lisp 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
339Run GDB as a subprocess of Emacs. If the variable 340Run 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
341value) then GDB starts as for @kbd{M-x gdba} below. If you want GDB 342earlier then edit the string in the minibuffer or set
342to 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
343minibuffer or set @code{gud-gdb-command-name} to ``gdb --fullname''. 344this if you want to run multiple debugging sessions within one Emacs
344You need to do this if you want to run multiple debugging sessions 345session. In this case, the command creates a buffer for input and
345within one Emacs session. In this case, the command creates a buffer 346output to GDB, and switches to it. If a GDB buffer already exists, it
346for input and output to GDB, and switches to it. If a GDB buffer 347just switches to that buffer.
347already 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}
350Run GDB as a subprocess of Emacs, providing a graphical interface 350Run 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
569details. 569details.
570@end table 570@end table
571 571
572If you started GDB with the command @code{gdba}, you can click 572With 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 573line of the source buffer, in the fringe or display margin, to set a
574margin, to set a breakpoint there. If a breakpoint already exists on 574breakpoint there. If a breakpoint already exists on that line, this
575that line, this action will remove it. 575action will remove it (@code{gdb-mouse-set-clear-breakpoint}). Where
576(@code{gdb-mouse-toggle-breakpoint}). 576Emacs uses the margin to display breakpoints, it is also possible to
577enable 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
579that makes sense. 581that 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
666By default, the command @code{gdb} starts GDB using a graphical
667interface where you view and control the program's data using Emacs
668windows. You can still interact with GDB through the GUD buffer, but
669the point of this mode is that you can do it through menus and clicks,
670without needing to know GDB commands.
671
664@findex gdba 672@findex gdba
665The command @code{gdba} starts GDB using a graphical interface where 673If you have customised @code{gud-gdb-command-name}, then start this
666you view and control the program's data using Emacs windows. You can 674mode with the command @code{gdba}.
667still interact with GDB through the GUD buffer, but the point of this
668mode is that you can do it through menus and clicks, without needing
669to 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
722gdb-frame-@var{buffertype}-buffer} respectively, where @var{buffertype} 728gdb-frame-@var{buffertype}-buffer} respectively, where @var{buffertype}
723is the relevant buffer type e.g breakpoints. 729is the relevant buffer type e.g breakpoints.
724 730
731When you finish debugging then kill the GUD buffer with @kbd{C-x k},
732which will also kill all the buffers associated with the session.
733However you need not do this if, after editing and re-compiling your
734source code within Emacs, you wish continue debugging. When you
735restart execution, GDB will automatically find your new executable.
736Keeping the GUD buffer has the advantage of keeping the shell history
737as well as GDB's breakpoints. You need to check, however, that the
738breakpoints 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
828The assembler buffer displays the current frame as machine code. An 843The assembler buffer displays the current frame as machine code. An
829overlay arrow points to the current instruction and you can set and 844overlay arrow points to the current instruction and you can set and
830remove breakpoints as with the source buffer. Breakpoints also 845remove breakpoints as with the source buffer. Breakpoint icons also
831appear in the margin. 846appear in the fringe or margin.
832 847
833@item Threads Buffer 848@item Threads Buffer
834 849
835The threads buffer displays a summary of all threads currently in your 850The threads buffer displays a summary of all threads currently in your
836program.(@pxref{Threads,,, gdb, The GNU debugger}). Move point to 851program (@pxref{Threads,,, gdb, The GNU debugger}). Move point to
837any thread in the list and type @key{RET} to make it become the 852any thread in the list and type @key{RET} to make it become the
838current thread (@code{gdb-threads-select}) and display the associated 853current thread (@code{gdb-threads-select}) and display the associated
839source in the source buffer. Alternatively, click @kbd{Mouse-2} to 854source in the source buffer. Alternatively, click @kbd{Mouse-2} to
840make the selected thread become the current one. 855make the selected thread become the current one.
841 856
857@item Memory Buffer
858
859The memory buffer allows the user to examine sections of program
860memory (@pxref{Memory,,, gdb, The GNU debugger}). Click @kbd{Mouse-1}
861on the appropriate part of the header line to change the starting
862address or number of data items that the buffer displays.
863Click @kbd{Mouse-3} on the header line to select the display format
864or unit size for these data items.
865
842@end table 866@end table
843 867
844@node Executing Lisp 868@node Executing Lisp