From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.devel Subject: Difficulty using M-x gdb Date: Wed, 01 Feb 2023 09:53:05 -0500 Message-ID: <87357pqvxq.fsf@md5i.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11805"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Feb 01 15:56:57 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 1pNEXh-0002qY-2L for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Feb 2023 15:56:57 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNEU7-0001QI-W5; Wed, 01 Feb 2023 09:53:16 -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 1pNEU0-0001Ln-Ck for emacs-devel@gnu.org; Wed, 01 Feb 2023 09:53:12 -0500 Original-Received: from md5i.com ([75.151.244.229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNETy-0007ay-MI for emacs-devel@gnu.org; Wed, 01 Feb 2023 09:53:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=md5i.com; s=dkim; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From:Sender: Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=dcDFRXcNnO3C9NMD0amJjKQv0aQMWouNUCHrDi7gcbU=; b=UuN15Yos0M5wDHScD4DzXRAeTX vFwHJX8vzuMRCsn/w/+ColUz4SzepDlk8j6mYo5lrXYqPlICYnVmJpL1BMU8gEPcLskoRQnr09XX6 preRcinSq8rr/B2b1L8hfRgYR; Original-Received: from abode ([192.168.177.1]:44756 helo=miko) by md5i.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1pNETx-00EIpF-1f for emacs-devel@gnu.org; Wed, 01 Feb 2023 09:53:05 -0500 Received-SPF: pass client-ip=75.151.244.229; envelope-from=mwd@md5i.com; helo=md5i.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:302865 Archived-At: I have used "M-x gud-gdb" to run gdb for many years. I used it for quite a while after the gdb-mi interface was added due to its ability to debug the same program multiple times at the same time in the same Emacs. I don't need that capability right now. Due to a bug in `gud-gdb` (#61162) I am trying to switch to "M-x gdb" instead. Unfortunately, I can't really figure out how to make this work in a way that makes sense to me. `gdb-many-windows` being nil is the default, and the default should be reasonably easy to use (one would hope), but I am having the following problem: 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? If it requires customization, why is customization needed to make this fairly common case work well? Is there a way to make output go the interaction buffer? Maybe most importantly, this input/output buffer/window doesn't seem to be mentioned in the Emacs documentation at all. 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. -- Michael Welsh Duggan (md5i@md5i.com)