From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: Starting multiple GUD session; doc problem Date: Sat, 25 Nov 2006 13:48:41 +1300 Message-ID: <17767.37609.24236.660750@kahikatea.snap.net.nz> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1164416366 1220 80.91.229.2 (25 Nov 2006 00:59:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 25 Nov 2006 00:59:26 +0000 (UTC) Cc: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 25 01:59:23 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Gnlt2-0004nW-87 for ged-emacs-devel@m.gmane.org; Sat, 25 Nov 2006 01:59:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gnlnc-0004Nn-5E for ged-emacs-devel@m.gmane.org; Fri, 24 Nov 2006 19:53:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gnlms-0004MS-9V for emacs-devel@gnu.org; Fri, 24 Nov 2006 19:52:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gnlmq-0004L0-8q for emacs-devel@gnu.org; Fri, 24 Nov 2006 19:52:57 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gnlmq-0004Kp-2L for emacs-devel@gnu.org; Fri, 24 Nov 2006 19:52:56 -0500 Original-Received: from [202.37.101.8] (helo=viper.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gnlmp-0007RO-IE for emacs-devel@gnu.org; Fri, 24 Nov 2006 19:52:56 -0500 Original-Received: from kahikatea.snap.net.nz (p202-124-120-219.snap.net.nz [202.124.120.219]) by viper.snap.net.nz (Postfix) with ESMTP id 9EFF03D83F8; Sat, 25 Nov 2006 13:53:33 +1300 (NZDT) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id B31AABE448; Sat, 25 Nov 2006 13:48:42 +1300 (NZDT) Original-To: Stephen Leake In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.0.91.2 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:62756 Archived-At: Stephen Leake writes: > I just tried to start two gdb sessions in one CVS Emacs session for > the first time (I've done this many times in Emacs 21). I got the > error message: > > "gdb: Multiple debugging is only supported with "gdb --fullname" > > So I dutifully added "--fullname" to the gdb command line: > > gdb --annotate=3 --fullname gds-main_models_test.exe Well, I'm not sure that's dutiful, it means start with "gdb --fullname" _instead of_ "gdb --annotate=3" but if other's find it ambiguous too I'll change it. > and got the same error message. I read the GUD and GDB entries in the > Emacs manual, and the help message for `gdb'; no success. Was this not clear: You can also run GDB in text command mode, like other debuggers. To do this, set `gud-gdb-command-name' to `"gdb --fullname"' or edit the startup command in the minibuffer to say that. You need to do use text command mode to run multiple debugging sessions within one Emacs session. > Finally I > read the Emacs lisp source code for gud, and found this comment in > gud.el (gud-gdb-marker-filter): > > ;; Check for annotations and change gud-minor-mode to 'gdba if > ;; they are found. This comment is not for users. > It seems the real issue is the presence or absence of "--annotate=3", > not the presence of "--fullname". In fact, "--fullname" is not > necessary if compilation-search-path is set to include the source > directories. That's not true. If "--annotate=3" is not used the option "--fullname" is necessary for the Emacs to display the current line in the source buffer. > So I suggest the attached patch to the Emacs manual (building.texi) > and a couple gud doc strings. >... > ;;;###autoload > (defun gdba (command-line) > ! "Run gdb on program FILE in buffer *gud-FILE*. > The directory containing FILE becomes the initial working directory > and source-file directory for your debugger. > > --- 214,220 ---- > > ;;;###autoload > (defun gdba (command-line) > ! "Run gdb in GUI mode on program FILE in buffer *gud-FILE*. > The directory containing FILE becomes the initial working directory > and source-file directory for your debugger. The current doc string goes on to explain what how this function lays out the buffers. To the first time user what would GUI mode mean? The other changes are wrong because "--fullname" is needed. Perhaps some confusion arises over the term "text command mode". It refers to the way that it works in Emacs 21: GUD buffer + source buffer. Perhaps you think it means just GUD buffer i.e like the command line in a terminal. Perhaps it would help to refer to "text command mode" in the section "Debugger Operation" (it currently says "using the textual interface"). -- Nick http://www.inet.net.nz/~nickrob