From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: jonetsu Newsgroups: gmane.emacs.help Subject: Re: Using gdb (windows popping up) Date: Sun, 9 Jun 2019 15:27:05 -0400 Message-ID: <20190609152705.705c806b@mistral> References: <20190609115246.41281b50@mistral> <83ftoibofg.fsf@gnu.org> <20190609145921.0fc60f3c@mistral> <83ef42bmij.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="72702"; mail-complaints-to="usenet@blaine.gmane.org" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 09 21:27:22 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ha3TN-000Il2-4s for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Jun 2019 21:27:21 +0200 Original-Received: from localhost ([::1]:37854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha3TL-0002kP-FS for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Jun 2019 15:27:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60439) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha3T9-0002k2-Uf for help-gnu-emacs@gnu.org; Sun, 09 Jun 2019 15:27:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ha3T8-0007Jr-Sh for help-gnu-emacs@gnu.org; Sun, 09 Jun 2019 15:27:07 -0400 Original-Received: from pmta21.teksavvy.com ([76.10.157.36]:30719) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1ha3T8-0007JP-Mq for help-gnu-emacs@gnu.org; Sun, 09 Jun 2019 15:27:06 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2HbBgA0XP1c/0Tb1BhmHgEGBwaBZYFnK?= =?us-ascii?q?kd0IRIojRCMAzUBjiCMBQkBAQE6AQIBAYQ6AgIBAQKCaiQ4EwEDAQEBBAEBAQE?= =?us-ascii?q?EAgJpKIVMAQQBOhwoCwgDCRglD0gZhR4Pp0uIY4FGIoESi3SBP0CEIz6FEYUVB?= =?us-ascii?q?ItGiEKVHwmCEYFpkU0nDIxgii+lWyKBWHAVgyeBF4IdAQKNNyYwgQIBBgEBARU?= =?us-ascii?q?IEwUFAQGPLwEB?= X-IPAS-Result: =?us-ascii?q?A2HbBgA0XP1c/0Tb1BhmHgEGBwaBZYFnKkd0IRIojRCMAzU?= =?us-ascii?q?BjiCMBQkBAQE6AQIBAYQ6AgIBAQKCaiQ4EwEDAQEBBAEBAQEEAgJpKIVMAQQBO?= =?us-ascii?q?hwoCwgDCRglD0gZhR4Pp0uIY4FGIoESi3SBP0CEIz6FEYUVBItGiEKVHwmCEYF?= =?us-ascii?q?pkU0nDIxgii+lWyKBWHAVgyeBF4IdAQKNNyYwgQIBBgEBARUIEwUFAQGPLwEB?= X-IronPort-AV: E=Sophos;i="5.60,572,1549947600"; d="scan'208";a="94498261" Original-Received: from 24-212-219-68.cable.teksavvy.com (HELO mistral) ([24.212.219.68]) by smtp.teksavvy.com with ESMTP; 09 Jun 2019 15:27:05 -0400 In-Reply-To: <83ef42bmij.fsf@gnu.org> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 76.10.157.36 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:120879 Archived-At: On Sun, 09 Jun 2019 22:13:08 +0300 Eli Zaretskii wrote: > My personal advice is to start the debugging session with "M-x > gdb-many-windows", which will open all the UI windows, including I/O. > I believe in this case the program's output will be inserted into the > I/O window, and will not usurp any of your other windows. In the previous approach I took, yesterday, I set gdb-many-windows to non-nil and immediately experienced that control over where one wants the buffers to be displayed becomes tense, so to speak. A bit like fighting with a word processor that insists that paragraphs must be formatted in one way. So I now prefer to drop that many windows approach and open up other gdb windows as need arises. This let me place buffers in a more reasonable way. Only setting the gdb-show-main variable to non-nil so that a M-x gdb session starts with two buffers, source and gdb interactive. Then I can split windows in every which way to show any other buffer, add a gdb input/output window before it decides on its own to show one, etc.. This is with sr-speedbar and the lisp snippet I've shown in this thread. Yes, I've seen that the manual advises to uses M-x gdb in a distinct frame. The problem with this is that while debugging I can consult other non-gdb buffers, sometimes for a while, before doing the next debugger step. Doing this on Linux switching to a different desktop is easy, although I still prefer to have one emacs session where all the files are, and not two of them. The approach I'm using now seems to support that.