From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14670 invoked by alias); 6 Jun 2007 04:58:12 -0000 Received: (qmail 14662 invoked by uid 22791); 6 Jun 2007 04:58:09 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 06 Jun 2007 04:58:05 +0000 Received: from kahikatea.snap.net.nz (137.63.255.123.dynamic.snap.net.nz [123.255.63.137]) by viper.snap.net.nz (Postfix) with ESMTP id 6D4F43D8140 for ; Wed, 6 Jun 2007 16:58:01 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id EFE548F9CE; Wed, 6 Jun 2007 16:57:50 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18022.16077.778786.351933@kahikatea.snap.net.nz> Date: Wed, 06 Jun 2007 04:58:00 -0000 To: gdb-patches@sourceware.org Subject: [PATCH:doco] Update Emacs node for Emacs 22.1 X-Mailer: VM 7.19 under Emacs 22.1.50.10 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-06/txt/msg00058.txt.bz2 This patch follows the release of Emacs 22.1. -- Nick http://www.inet.net.nz/~nickrob 2007-06-06 Nick Roberts * gdb.texinfo (Emacs): Describe GDB under Emacs 22.1. *** gdb.texinfo 04 Jun 2007 00:19:02 +1200 1.407 --- gdb.texinfo 06 Jun 2007 16:52:29 +1200 *************** executable file you want to debug as an *** 16780,16792 **** created Emacs buffer. @c (Do not use the @code{-tui} option to run @value{GDBN} from Emacs.) ! Using @value{GDBN} under Emacs is just like using @value{GDBN} normally except for two things: @itemize @bullet @item ! All ``terminal'' input and output goes through the Emacs buffer. ! @end itemize This applies both to @value{GDBN} commands and their output, and to the input and output done by the program you are debugging. --- 16780,16792 ---- created Emacs buffer. @c (Do not use the @code{-tui} option to run @value{GDBN} from Emacs.) ! Running @value{GDBN} under Emacs can be just like running @value{GDBN} normally except for two things: @itemize @bullet @item ! All ``terminal'' input and output goes through an Emacs buffer, called ! the GUD buffer. This applies both to @value{GDBN} commands and their output, and to the input and output done by the program you are debugging. *************** with your program. In particular, you c *** 16800,16809 **** way---for example, @kbd{C-c C-c} for an interrupt, @kbd{C-c C-z} for a stop. - @itemize @bullet @item @value{GDBN} displays source code through Emacs. - @end itemize Each time @value{GDBN} displays a stack frame, Emacs automatically finds the source file for that frame and puts an arrow (@samp{=>}) at the --- 16800,16807 ---- *************** and the source. *** 16813,16818 **** --- 16811,16822 ---- Explicit @value{GDBN} @code{list} or search commands still produce output as usual, but you probably have no reason to use them from Emacs. + @end itemize + + We call this @dfn{text command mode}. Emacs 22.1, and later, also uses + a graphical mode, enabled by default, which provides further buffers + that can control the execution and describe the state of your program. + @xref{GDB Graphical Interface,,, Emacs, The @sc{gnu} Emacs Manual}. If you specify an absolute file name when prompted for the @kbd{M-x gdb} argument, then Emacs sets your current working directory to where *************** some operating systems it might not find *** 16825,16833 **** buffer does not display the current source and line of execution. The initial working directory of @value{GDBN} is printed on the top ! line of the @value{GDBN} I/O buffer and this serves as a default for ! the commands that specify files for @value{GDBN} to operate ! on. @xref{Files, ,Commands to Specify Files}. By default, @kbd{M-x gdb} calls the program called @file{gdb}. If you need to call @value{GDBN} by a different name (for example, if you --- 16829,16837 ---- buffer does not display the current source and line of execution. The initial working directory of @value{GDBN} is printed on the top ! line of the GUD buffer and this serves as a default for the commands ! that specify files for @value{GDBN} to operate on. @xref{Files, ! ,Commands to Specify Files}. By default, @kbd{M-x gdb} calls the program called @file{gdb}. If you need to call @value{GDBN} by a different name (for example, if you *************** keep several configurations around, with *** 16835,16846 **** customize the Emacs variable @code{gud-gdb-command-name} to run the one you want. ! In the @value{GDBN} I/O buffer, you can use these special Emacs commands in addition to the standard Shell mode commands: @table @kbd @item C-h m ! Describe the features of Emacs' @value{GDBN} Mode. @item C-c C-s Execute to another source line, like the @value{GDBN} @code{step} command; also --- 16839,16850 ---- customize the Emacs variable @code{gud-gdb-command-name} to run the one you want. ! In the GUD buffer, you can use these special Emacs commands in addition to the standard Shell mode commands: @table @kbd @item C-h m ! Describe the features of Emacs' GUD Mode. @item C-c C-s Execute to another source line, like the @value{GDBN} @code{step} command; also *************** Go down the number of frames indicated b *** 16876,16887 **** In any source file, the Emacs command @kbd{C-x @key{SPC}} (@code{gud-break}) tells @value{GDBN} to set a breakpoint on the source line point is on. ! If you type @kbd{M-x speedbar}, then Emacs displays a separate frame which ! shows a backtrace when the @value{GDBN} I/O buffer is current. Move ! point to any frame in the stack and type @key{RET} to make it become the ! current frame and display the associated source in the source buffer. ! Alternatively, click @kbd{Mouse-2} to make the selected frame become the ! current one. If you accidentally delete the source-display buffer, an easy way to get it back is to type the command @code{f} in the @value{GDBN} buffer, to --- 16880,16892 ---- In any source file, the Emacs command @kbd{C-x @key{SPC}} (@code{gud-break}) tells @value{GDBN} to set a breakpoint on the source line point is on. ! In text command mode, if you type @kbd{M-x speedbar}, Emacs displays a ! separate frame which shows a backtrace when the GUD buffer is current. ! Move point to any frame in the stack and type @key{RET} to make it ! become the current frame and display the associated source in the ! source buffer. Alternatively, click @kbd{Mouse-2} to make the ! selected frame become the current one. In graphical mode, the ! speedbar displays watch expressions. If you accidentally delete the source-display buffer, an easy way to get it back is to type the command @code{f} in the @value{GDBN} buffer, to *************** communicates with Emacs in terms of line *** 16896,16904 **** delete lines from the text, the line numbers that @value{GDBN} knows cease to correspond properly with the code. ! The description given here is for GNU Emacs version 21.3 and a more ! detailed description of its interaction with @value{GDBN} is given in ! the Emacs manual (@pxref{Debuggers,,, Emacs, The @sc{gnu} Emacs Manual}). @c The following dropped because Epoch is nonstandard. Reactivate @c if/when v19 does something similar. ---doc@cygnus.com 19dec1990 --- 16901,16909 ---- delete lines from the text, the line numbers that @value{GDBN} knows cease to correspond properly with the code. ! A more detailed description of Emacs' interaction with @value{GDBN} is ! given in the Emacs manual (@pxref{Debuggers,,, Emacs, The @sc{gnu} ! Emacs Manual}). @c The following dropped because Epoch is nonstandard. Reactivate @c if/when v19 does something similar. ---doc@cygnus.com 19dec1990