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: gdb with many windows: kill associated buffers doesn't always work Date: Wed, 24 May 2006 09:26:57 +1200 Message-ID: <17523.32289.623746.777290@kahikatea.snap.net.nz> References: <17522.54798.555541.900063@kahikatea.snap.net.nz> <17522.63562.688773.821247@kahikatea.snap.net.nz> <17522.65304.733011.461493@kahikatea.snap.net.nz> 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 1148419691 26815 80.91.229.2 (23 May 2006 21:28:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 23 May 2006 21:28:11 +0000 (UTC) Cc: Andreas Schwab , emacs-devel@gnu.org, Klaus Zeitler Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 23 23:28:07 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 1FieQ9-0007Aa-VE for ged-emacs-devel@m.gmane.org; Tue, 23 May 2006 23:28:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FieQ9-0007jn-Ep for ged-emacs-devel@m.gmane.org; Tue, 23 May 2006 17:28:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FiePY-0007Zc-5b for emacs-devel@gnu.org; Tue, 23 May 2006 17:27:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FiePX-0007Yw-3J for emacs-devel@gnu.org; Tue, 23 May 2006 17:27:27 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FiePW-0007Ys-W7 for emacs-devel@gnu.org; Tue, 23 May 2006 17:27:27 -0400 Original-Received: from [202.37.101.8] (helo=viper.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FieTo-0004Kz-Ru for emacs-devel@gnu.org; Tue, 23 May 2006 17:31:53 -0400 Original-Received: from kahikatea.snap.net.nz (p319-tnt1.snap.net.nz [202.124.111.65]) by viper.snap.net.nz (Postfix) with ESMTP id C94267579E9; Wed, 24 May 2006 09:27:25 +1200 (NZST) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 20CFA1D3550; Wed, 24 May 2006 09:26:59 +1200 (NZST) Original-To: Stefan Monnier In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.0.50.13 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:55158 Archived-At: > >> > The gdb process only dies if you quit the session. > >> It can die for any reason. > > If GDB crashes then thats a bug in GDB and this should rarely happen. > > "Should" is the operative word here. Well it rarely happens to me. Please report such occurances to the GDB mailing list to help stop this happening. > > Could you name a few other reasons? > > Even if it doesn't crash, it can get into a state that I find easier to > cleanup by quit&restart than by trying to figure out whether the situation > can be salvaged and how. It may even happen without any bug whatsoever, > just because you've set enough GDB envvars and options and you want to reset > them to some default state. Maybe GDB offers such a command, but using > quit&restart has the advantage that it's a universal way to do it, > non-specific to GDB. OK, I hear that people are saying that they may want to keep the GUD buffer. I now see that I made a mistake in gud-sentinel in gud.el. Klaus, Does the patch below give you the behaviour you want? -- Nick http://www.inet.net.nz/~nickrob *** gud.el 24 May 2006 09:21:32 +1200 1.107 --- gud.el 24 May 2006 09:24:48 +1200 *************** It is saved for when this flag is not se *** 2693,2702 **** ((memq (process-status proc) '(signal exit)) ;; Stop displaying an arrow in a source file. (setq gud-overlay-arrow-position nil) ! (with-current-buffer gud-comint-buffer ! (if (memq gud-minor-mode-type '(gdbmi gdba)) ! (gdb-reset) ! (gud-reset))) (let* ((obuf (current-buffer))) ;; save-excursion isn't the right thing if ;; process-buffer is current-buffer --- 2693,2702 ---- ((memq (process-status proc) '(signal exit)) ;; Stop displaying an arrow in a source file. (setq gud-overlay-arrow-position nil) ! (if (memq (buffer-local-value 'gud-minor-mode gud-comint-buffer) ! '(gdba gdbmi)) ! (gdb-reset) ! (gud-reset)) (let* ((obuf (current-buffer))) ;; save-excursion isn't the right thing if ;; process-buffer is current-buffer