From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: gdb-ui, dedicated windows Date: Wed, 09 Jul 2008 08:46:18 +0900 Message-ID: <871w24ndmd.fsf@catnip.gol.com> References: <87zlowwyn1.fsf@localhorst.mine.nu> <18543.18102.11098.763936@kahikatea.snap.net.nz> <87vdzkwqlr.fsf@localhorst.mine.nu> <18545.40372.978280.247737@kahikatea.snap.net.nz> <18547.64152.956371.924404@kahikatea.snap.net.nz> Reply-To: Miles Bader NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1215560807 14810 80.91.229.12 (8 Jul 2008 23:46:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Jul 2008 23:46:47 +0000 (UTC) Cc: David Hansen , emacs-devel@gnu.org To: Nick Roberts Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 09 01:47:34 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KGMu8-0006zy-MA for ged-emacs-devel@m.gmane.org; Wed, 09 Jul 2008 01:47:28 +0200 Original-Received: from localhost ([127.0.0.1]:49871 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KGMtH-0002Jg-EI for ged-emacs-devel@m.gmane.org; Tue, 08 Jul 2008 19:46:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KGMtD-0002JP-5T for emacs-devel@gnu.org; Tue, 08 Jul 2008 19:46:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KGMtB-0002Ht-Ff for emacs-devel@gnu.org; Tue, 08 Jul 2008 19:46:30 -0400 Original-Received: from [199.232.76.173] (port=36566 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KGMtB-0002Hq-7q for emacs-devel@gnu.org; Tue, 08 Jul 2008 19:46:29 -0400 Original-Received: from smtp11.dentaku.gol.com ([203.216.5.73]:57792) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KGMt7-00083v-3C; Tue, 08 Jul 2008 19:46:25 -0400 Original-Received: from 218.33.235.146.eo.eaccess.ne.jp ([218.33.235.146] helo=catnip.gol.com) by smtp11.dentaku.gol.com with esmtpa (Dentaku) id 1KGMt3-0006G1-DH; Wed, 09 Jul 2008 08:46:21 +0900 Original-Received: by catnip.gol.com (Postfix, from userid 1000) id AB2392F3A; Wed, 9 Jul 2008 08:46:18 +0900 (JST) System-Type: i686-pc-linux-gnu In-Reply-To: <18547.64152.956371.924404@kahikatea.snap.net.nz> (Nick Roberts's message of "Wed, 9 Jul 2008 11:39:04 +1200") Original-Lines: 34 X-Virus-Scanned: ClamAV GOL (outbound) X-Abuse-Complaints: abuse@gol.com X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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:100470 Archived-At: Nick Roberts writes: > > (4) Switch back to the *gud...* buffer using "C-x b *gud...* RET" > > > > (5) Try to pop up the source buffer again using a gdb command, e.g., > > just "frame RET". > > > > *bang*, *gdb...* buffer disappears, source buffer is only ting > > displayed... :-( > > OK. When you do (4) you put the GUD buffer in the window that > gdb-source-window points to. So when you do 'f' gdb-ui thinks the source > should go there. > > I'm not sure what I can do as commands like switch-to-buffer are built-in. > Maybe some kind of hook in window-size-change-functions to keep gdb-ui > up-to-date. Or perhaps having window groups would make it impossible to switch > the source buffer for the GUD buffer if they were assigned to different groups. gud/gdb-ui shouldn't be storing window references like that and assuming the associated buffer hasn't been changed by the user, because that's an assumption that doesn't hold in emacs. Perhaps that code is left over from the "old" gdb-ui which used dedicated windows? A possible fix would be to store the buffer gdb puts in that window, and when deciding whether to re-use that window or, also verify that the same buffer is there (and don't re-use the window if not). -Miles -- Acquaintance, n. A person whom we know well enough to borrow from, but not well enough to lend to.