From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: StrawberryTea Newsgroups: gmane.emacs.bugs Subject: bug#65007: [PATCH] Allow displaying program IO in the GDB buffer. Date: Sat, 16 Sep 2023 01:08:44 -0500 Message-ID: <87ttrulk96.fsf@strawberrytea.xyz> References: <87sf91bm4b.fsf@yahoo.com> <83wmxgkj6f.fsf@gnu.org> <834jjwkjxe.fsf@gnu.org> <87y1h6ll8f.fsf@strawberrytea.xyz> <8334zek606.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21492"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.10.6; emacs 30.0.50 Cc: luangruo@yahoo.com, 65007@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 16 08:13:23 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qhOYO-0005Ix-1P for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Sep 2023 08:13:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhOY4-0006iX-DP; Sat, 16 Sep 2023 02:12:56 -0400 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 1qhOY3-0006hx-Cj for bug-gnu-emacs@gnu.org; Sat, 16 Sep 2023 02:12:55 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qhOY3-0007SA-3C for bug-gnu-emacs@gnu.org; Sat, 16 Sep 2023 02:12:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qhOY9-0002qY-TJ for bug-gnu-emacs@gnu.org; Sat, 16 Sep 2023 02:13:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: StrawberryTea Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Sep 2023 06:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65007 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 65007-submit@debbugs.gnu.org id=B65007.169484474210893 (code B ref 65007); Sat, 16 Sep 2023 06:13:01 +0000 Original-Received: (at 65007) by debbugs.gnu.org; 16 Sep 2023 06:12:22 +0000 Original-Received: from localhost ([127.0.0.1]:45244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhOXW-0002pc-DV for submit@debbugs.gnu.org; Sat, 16 Sep 2023 02:12:22 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:38327) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhOXS-0002pO-OJ for 65007@debbugs.gnu.org; Sat, 16 Sep 2023 02:12:21 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A6A915C009D; Sat, 16 Sep 2023 02:12:06 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 16 Sep 2023 02:12:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= strawberrytea.xyz; h=cc:cc:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1694844726; x=1694931126; bh=A1tCGGYmI/tmbPNfMhDicGIZSKPxuBggzi5 W3PJmD+A=; b=pGTOVPnXHZkdjEaEX6Ah9XNqkLoZZq+aLJDczdRMv1tkla61Jcs 2MHj36ZsM4ONtsHiYRWDrku6LiTvdq4m1njfdzTocYntlO7Bir7oQOT1kbjJIDVv pUPSpdyIWMCnyxI4WYaNh7k1ywp9NS7LWwxaxmhA52nNjNfkrNdmWMh6pX//ht1G si7/uTHeqckLPIwEkQ+V1L40JlqAUkMc/lGD6rM4Z9R8Ga2hggVlZzOhq3y+aFyw mmvNqaNp7kmuSURJq6ULG/pcovjPgW77vS30wYr04VRn70DbVvW0tUHhJDd2axd6 dAVzqSpvXBYXlfZEbWOQcsUro+fjSkzpzWQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1694844726; x=1694931126; bh=A1tCGGYmI/tmb PNfMhDicGIZSKPxuBggzi5W3PJmD+A=; b=MSwB5I0b74+kItx6emoCQ0ssdpZUb Um6IYSCqGo5RLnKULsoFj1ep7ou2AFpuOnhkIA4UPmXfzsHSZtvLw4PmvWm97rxM LkHHgt4BoBtoNJeSLDAHdk2s1KwHFZEArWXXdWVjmBxSwsF7mMvrpGm8OnGd5qik XtPcHowNtWy4plO4uD6Dutxbk4/8icGaF94zODtWl73/otcyl1efbVMx2/JV3bmJ op4W0RZJJ7hY3Mm9m/snzK9GKyOChIhgMH4IWhxaDn11XydxME0n+t2s3CJ8MuPG qq94TvPk41mandjyRs0Q66aeWpYt1WNANwAV7E5xlYd3YyAC+r2alAdVA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudejfedguddtfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculddvfedmnecujfgurhepfhgfhffvvefuffgjkfggtgesthdtredt tdertdenucfhrhhomhepufhtrhgrfigsvghrrhihvfgvrgcuoehlohhokhesshhtrhgrfi gsvghrrhihthgvrgdrgiihiieqnecuggftrfgrthhtvghrnhepkeehgffhteethfefffek udegudeiuddtteduteevvdffieegkefgfefhkeffkeeknecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheplhhoohhksehsthhrrgifsggvrhhrhiht vggrrdighiii X-ME-Proxy: Feedback-ID: id85149b6:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 16 Sep 2023 02:12:06 -0400 (EDT) In-reply-to: <8334zek606.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:270580 Archived-At: Yeah, I added `org-msg' and I have been trying to figure out how to send a patch with it. Probably I would need to put it in a source block. But I just turned that off * lisp/progmodes/gdb-mi.el (gdb-split-io-flag): Don't create IO buffer if `gdb-split-io-flag'. (gdb-split-io-flag): New user option. --- lisp/progmodes/gdb-mi.el | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 42c1c715c73..8ce5df6e0c7 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -1098,9 +1098,10 @@ gdb-init-1 (if gdb-debuginfod-enable "on" "off")) 'gdb-debuginfod-message) - (gdb-get-buffer-create 'gdb-inferior-io) - (gdb-clear-inferior-io) - (gdb-inferior-io--init-proc (get-process "gdb-inferior")) + (when gdb-display-io-buffer + (gdb-get-buffer-create 'gdb-inferior-io) + (gdb-clear-inferior-io) + (gdb-inferior-io--init-proc (get-process "gdb-inferior"))) (when (eq system-type 'windows-nt) ;; Don't create a separate console window for the debuggee. @@ -1828,6 +1829,13 @@ gdb-display-io-nopopup :group 'gdb :version "25.1") +(defcustom gdb-display-io-buffer t + "When non-nil, display the `gdb-inferior-io' buffer. Otherwise, +send program output to the GDB buffer." + :type 'boolean + :group 'gdb + :version "30.1") + (defun gdb-inferior-filter (proc string) (unless (string-equal string "") (let (buf) -- 2.42.0 Eli Zaretskii writes: >> From: StrawberryTea >> Cc: luangruo@yahoo.com, 65007@debbugs.gnu.org >> Date: Sat, 16 Sep 2023 00:38:21 -0500 >> >> Yup. Here it is. > > Thanks. But did you forget to attach the patch? I see a strangely > formatted patch, with some Unicode symbols instead of ASCII characters > I expect to see in diffs. > >> By the way, is there any information on debugging or stepping through the display engine? > > Yes, see etc/DEBUG, under "Debugging Emacs redisplay problems".