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 14:59:21 -0400 Message-ID: <20190609145921.0fc60f3c@mistral> References: <20190609115246.41281b50@mistral> <83ftoibofg.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="234098"; 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 20:59:43 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 1ha32c-000ymI-Vw for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Jun 2019 20:59:43 +0200 Original-Received: from localhost ([::1]:37598 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha32b-0000wT-Ep for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Jun 2019 14:59:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54770) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha32O-0000uv-Ji for help-gnu-emacs@gnu.org; Sun, 09 Jun 2019 14:59:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ha32M-0004Ux-Jq for help-gnu-emacs@gnu.org; Sun, 09 Jun 2019 14:59:28 -0400 Original-Received: from pmta11.teksavvy.com ([76.10.157.34]:26749) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1ha32K-0004TY-1X for help-gnu-emacs@gnu.org; Sun, 09 Jun 2019 14:59:24 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2HZBgB8Vv1c/0Tb1BhmHgEGBwaBZYIRR?= =?us-ascii?q?3QhEiiNEIwDNQGOIIwFCQEBAToBAgEBhDoCAgEBAoJqJDgTAQMBAQEEAQEBAQQ?= =?us-ascii?q?CAmkohUwBBAE6HCgLCAMJGCUPSBmFHg+nQIhjgUYigRKLdIE/QIQjPoQdC2mFF?= =?us-ascii?q?QSUCJUfCYIRgWmRTScMjGCKL6VbIoFYcBWDJ5BuJjCBAgEGAQEBFQgTBQUBAYx?= =?us-ascii?q?dglIBAQ?= X-IPAS-Result: =?us-ascii?q?A2HZBgB8Vv1c/0Tb1BhmHgEGBwaBZYIRR3QhEiiNEIwDNQG?= =?us-ascii?q?OIIwFCQEBAToBAgEBhDoCAgEBAoJqJDgTAQMBAQEEAQEBAQQCAmkohUwBBAE6H?= =?us-ascii?q?CgLCAMJGCUPSBmFHg+nQIhjgUYigRKLdIE/QIQjPoQdC2mFFQSUCJUfCYIRgWm?= =?us-ascii?q?RTScMjGCKL6VbIoFYcBWDJ5BuJjCBAgEGAQEBFQgTBQUBAYxdglIBAQ?= X-IronPort-AV: E=Sophos;i="5.60,572,1549947600"; d="scan'208";a="96672277" 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 14:59:22 -0400 In-Reply-To: <83ftoibofg.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.34 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:120877 Archived-At: On Sun, 09 Jun 2019 21:31:47 +0300 Eli Zaretskii wrote: > Alternatively, after "M-x gdb" type "start ARGUMENTS" to start the > program and stop it at the entry to the main function. Then set your > breakpoints after switching to the source file you want in the window > where Emacs shows the file with the main function. At the moment I seem to have attained a stable procedure. In the sense that the overhead is now limited and predictable. > As yet another alternative, customize gdb-show-main to a non-nil > value, and then "M-x gdb" will automatically show the source file with > the main function in a window; switch in that window to your other > source file where you want to set a breakpoint, then start the > program. Yes, gdb-show-main is set to non-nil. And yes, it will then show the source beside the gdb interactive buffer.... until a printf/cout statement is issued at which point the input/output window will "aggressively" - as it was termed in a Stack Exchange topic - take over and decide where any other buffer you deem to see will be actually located. Fortunately, the fix I found, setting gdb-display-io-nopopup (starting at emacs 25) to non-nil solves the issue and brings back peace of mind regarding the expected freedom one expects in emacs regarding placing buffers where one wants them. In other words, if removes a good part of the tool's quirks in this context and enables one to concentrate on work. That such behaviour found its way in emacs is something else. Imagine any power tool built wit such quirkiness.