From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Difficulty using M-x gdb Date: Wed, 01 Feb 2023 19:07:18 +0200 Message-ID: <83pmatz54p.fsf@gnu.org> References: <87357pqvxq.fsf@md5i.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23107"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Michael Welsh Duggan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Feb 01 18:08:10 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pNGaf-0005op-QZ for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Feb 2023 18:08:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNGZv-0004er-Qc; Wed, 01 Feb 2023 12:07:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNGZt-0004ee-TQ for emacs-devel@gnu.org; Wed, 01 Feb 2023 12:07:22 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNGZt-000399-IQ; Wed, 01 Feb 2023 12:07:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=UuBZh943ROkAzHbIlYzB5cPMMxObuHakrGSzbU5wmbY=; b=qmR0fUSBu70a xWFbKsXg399h+vNrNGlLIjHAWN7wq+BzwoZ/H/HVhZlqSk9Q2U88kqJBOcRvxYHNKCSEHcn6qhDec dscD1wKyut6vB2vbjTkY3Z8PAZDXHfA3yOHyKiGUQcIdMLAYELAaWz/eaySrTmICr+4bby0TLzutY d3QhoEZ2uN9HGUZsy0OL+vlzSb9/SQr1rnj3MKgTRr7ojd1pDcoYNegY/m6aEVPx3APJVgM9YEtxO 7+Dmcdojidl4w2dwzW8pctt4uSmroSh6fyNmnzExVJK/nxDh8J3wyTX2jyUfHrbmbjfzUpszQgqAg DGhOHc/pFOylifPDrStWIA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNGZs-0006OG-1J; Wed, 01 Feb 2023 12:07:21 -0500 In-Reply-To: <87357pqvxq.fsf@md5i.com> (message from Michael Welsh Duggan on Wed, 01 Feb 2023 09:53:05 -0500) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302867 Archived-At: > From: Michael Welsh Duggan > Date: Wed, 01 Feb 2023 09:53:05 -0500 > > When I step through a program, the interface keeps track of where I am > in the source buffer. But, when the program produces output, it > replaces the source buffer window with an input/output buffer window > which is dedicated. The only way I have found out to display the source > buffer again is to use "M-x gdb-restore-windows". In code that is doing > a fair amount of output, this is very tedious. > > What is right way to handle this? Try "M-x gdb-display-io-buffer RET". (You can also activate that window (or any other gdb-mi window) via the menu bar's Gud->GDB-Windows menu.) > If it requires customization, why is > customization needed to make this fairly common case work well? Not every program communicates via stdin/stdout, and when a program doesn't, popping up another window would be a nuisance, I think. > Maybe most importantly, this input/output buffer/window doesn't seem > to be mentioned in the Emacs documentation at all. It is mentioned, but maybe not prominently enough. Patches welcome, or I will get to adding that soon. > I have my suspicions that, once I get used to the new interface, I might > like using it, but right now I'm having difficulty figuring out what > habits I need to relearn. My suggestion is to start with gdb-many-windows, and then close those windows you don't need.