GNU bug report logs - #10285
gdb-mi should accept some process I/O before GDB actually starts

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Phillip Susi <psusi@HIDDEN>; dated Mon, 12 Dec 2011 21:06:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Removed tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 10285 <at> debbugs.gnu.org:


Received: (at 10285) by debbugs.gnu.org; 16 Jul 2021 13:04:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 16 09:04:30 2021
Received: from localhost ([127.0.0.1]:50870 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m4NW1-0000RU-V4
	for submit <at> debbugs.gnu.org; Fri, 16 Jul 2021 09:04:30 -0400
Received: from quimby.gnus.org ([95.216.78.240]:40948)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1m4NVz-0000RG-SE
 for 10285 <at> debbugs.gnu.org; Fri, 16 Jul 2021 09:04:28 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=TBQfiHIiYuCNQ4p202nYwSdQFa2NjvP9X2TfrZ2Gatc=; b=AaKZFxg5bQvLBZ9KqLhn55Am6f
 56dFHd/bKBaXkYA5MO/oGeB4hGA27y2/vpirOu2x5qHuDJMSWwpLadmHVNG0W/TqeIuZ/+RZ8DG8w
 VKATEF1NytH2dolItmmNnnTUHmfknBG3IQq9p7sk9quFXKBiICeToo5jb3cvLttQqVBs=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1m4NVq-0004Y8-30; Fri, 16 Jul 2021 15:04:20 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#10285: gdb-mi should accept some process I/O before GDB
 actually starts
References: <4EE66C58.6000303@HIDDEN>
 <jwvk461h3p9.fsf-monnier+emacs@HIDDEN> <4EE676D1.5030508@HIDDEN>
 <jwvfwgoftkd.fsf-monnier+emacs@HIDDEN>
X-Now-Playing: Mr. Jones's _Sounds For The Mute_: "Sounds For The Mute"
Date: Fri, 16 Jul 2021 15:04:17 +0200
In-Reply-To: <jwvfwgoftkd.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Tue, 13 Dec 2011 09:21:29 -0500")
Message-ID: <87fswe8l66.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Stefan Monnier <monnier@HIDDEN> writes: >>>
 Presumably
 now that you know you need to add the magic argument, you are >>> able to
 fix the command to make your gdb+sudo case work, right? >> No, because sudo
 runs before gdb and prompts for you [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 10285
Cc: 10285 <at> debbugs.gnu.org, Phillip Susi <psusi@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Stefan Monnier <monnier@HIDDEN> writes:

>>> Presumably now that you know you need to add the magic argument, you are
>>> able to fix the command to make your gdb+sudo case work, right?
>> No, because sudo runs before gdb and prompts for your password, which
>> it never gets, so gdb never runs and spits out whatever Emacs is
>> waiting to see.
>
> Ah, and indeed the code in the pretest won't help.
> We need further changes to gdb-mi.el to accommodate your use case, but
> those changes would be too intrusive to add at this stage, so it'll have
> to wait for after 24.1.

I tried reproducing this in Emacs 28, but the instructions were
unclear.  What command is issued after saying `M-x gdb'?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#10285; Package emacs. Full text available.
bug Marked as found in versions 24.1. Request was from Stefan Monnier <monnier@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Changed bug title to 'gdb-mi should accept some process I/O before GDB actually starts' from '23.3; Gud hangs terminal when not running gdb --annotate=3' Request was from Stefan Monnier <monnier@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 10285 <at> debbugs.gnu.org:


Received: (at 10285) by debbugs.gnu.org; 13 Dec 2011 14:22:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 13 09:22:51 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RaTFr-0003pj-HV
	for submit <at> debbugs.gnu.org; Tue, 13 Dec 2011 09:22:51 -0500
Received: from ironport2-out.teksavvy.com ([206.248.154.183])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>)
	id 1RaTFp-0003pX-K5; Tue, 13 Dec 2011 09:22:50 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av0EAEBe505FxLI7/2dsb2JhbABEqyGBBoFyAQEEAVYeBRALDiIEEhQYDSSIDwi1dIhQgxgEiDCaOIRQ
X-IronPort-AV: E=Sophos;i="4.71,345,1320642000"; d="scan'208";a="152091327"
Received: from 69-196-178-59.dsl.teksavvy.com (HELO ceviche.home)
	([69.196.178.59])
	by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
	13 Dec 2011 09:21:30 -0500
Received: by ceviche.home (Postfix, from userid 20848)
	id C54A46619A; Tue, 13 Dec 2011 09:21:29 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Phillip Susi <psusi@HIDDEN>
Subject: Re: bug#10285: 23.3;
	Gud hangs terminal when not running gdb --annotate=3
Message-ID: <jwvfwgoftkd.fsf-monnier+emacs@HIDDEN>
References: <4EE66C58.6000303@HIDDEN>
	<jwvk461h3p9.fsf-monnier+emacs@HIDDEN> <4EE676D1.5030508@HIDDEN>
Date: Tue, 13 Dec 2011 09:21:29 -0500
In-Reply-To: <4EE676D1.5030508@HIDDEN> (Phillip Susi's message of "Mon, 12
	Dec 2011 16:49:05 -0500")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.6 (--)
X-Debbugs-Envelope-To: 10285
Cc: 10285 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)

retitle 10285 gdb-mi should accept some process I/O before GDB actually starts
found 10285 24.1
thanks

>> Could you check the Emacs-24 pretest to see if it addresses the problem?
> Where can I find that?  I don't see it on the main web site.

Since it's a pretest it's not advertised there.
You can find it at http://alpha.gnu.org/gnu/emacs/pretest/

>> Presumably now that you know you need to add the magic argument, you are
>> able to fix the command to make your gdb+sudo case work, right?
> No, because sudo runs before gdb and prompts for your password, which
> it never gets, so gdb never runs and spits out whatever Emacs is
> waiting to see.

Ah, and indeed the code in the pretest won't help.
We need further changes to gdb-mi.el to accommodate your use case, but
those changes would be too intrusive to add at this stage, so it'll have
to wait for after 24.1.

In the mean time, I suggest you use M-x gud-gdb RET which uses the old
(Emacs-22) simpler GUD interaction and just requires a "--fullname"
argument (and whose absence won't be as problematic, tho it'll prevent
Emacs from jumping to the source code for you).


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#10285; Package emacs. Full text available.

Message received at 10285 <at> debbugs.gnu.org:


Received: (at 10285) by debbugs.gnu.org; 12 Dec 2011 21:41:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 12 16:41:59 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RaDdG-0004g5-Lu
	for submit <at> debbugs.gnu.org; Mon, 12 Dec 2011 16:41:59 -0500
Received: from ironport2-out.teksavvy.com ([206.248.154.183])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1RaDdD-0004fx-Jq
	for 10285 <at> debbugs.gnu.org; Mon, 12 Dec 2011 16:41:56 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av0EAKNz5k5FxLI7/2dsb2JhbABDqwaBBoFyAQEEAVYjBQsLDiIEEhQYDSSIG7U+iFWDGASIMZo0hFE
X-IronPort-AV: E=Sophos;i="4.71,341,1320642000"; d="scan'208";a="152022081"
Received: from 69-196-178-59.dsl.teksavvy.com (HELO ceviche.home)
	([69.196.178.59])
	by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
	12 Dec 2011 16:40:40 -0500
Received: by ceviche.home (Postfix, from userid 20848)
	id 0D2DB660D4; Mon, 12 Dec 2011 16:40:40 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Phillip Susi <psusi@HIDDEN>
Subject: Re: bug#10285: 23.3;
	Gud hangs terminal when not running gdb --annotate=3
Message-ID: <jwvk461h3p9.fsf-monnier+emacs@HIDDEN>
References: <4EE66C58.6000303@HIDDEN>
Date: Mon, 12 Dec 2011 16:40:39 -0500
In-Reply-To: <4EE66C58.6000303@HIDDEN> (Phillip Susi's message of "Mon, 12
	Dec 2011 16:04:24 -0500")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.6 (--)
X-Debbugs-Envelope-To: 10285
Cc: 10285 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)

> Ever since upgrading to emacs23 I have been unable to run gdb with sudo
> under emacs gud mode ( it never gets my password ).  I have recently studied
> the issue in depth and found that the problem is more broad than sudo.
> When starting gud mode with M-x gdb, it prompts you for what to run, and if
> you don't run gdb --annotate=3, then gud mode hangs and nothing you type is
> sent to the inferior process.  It seems --annotate=3 generates some magic
> output that gud mode is waiting on and until it sees it, will not forward
> anything you type to the inferior process.

Indeed.  This has more or less always been the case to some extent, but
the gdb-ui code in Emacs-23 made it worse.  Emacs-24 replaced that code
with gdb-mi (which uses --ui=mi instead of --annotate=3) which suffers
from the same problem, but we've added a check that signals an error to
the user pointing out the source of the problem, instead of just
hanging silently.

Could you check the Emacs-24 pretest to see if it addresses the problem?
Presumably now that you know you need to add the magic argument, you are
able to fix the command to make your gdb+sudo case work, right?

        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#10285; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Dec 2011 21:05:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 12 16:05:48 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RaD4F-0003oe-M8
	for submit <at> debbugs.gnu.org; Mon, 12 Dec 2011 16:05:48 -0500
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <psusi@HIDDEN>) id 1RaD4D-0003oY-VL
	for submit <at> debbugs.gnu.org; Mon, 12 Dec 2011 16:05:46 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <psusi@HIDDEN>) id 1RaD31-00032T-1r
	for submit <at> debbugs.gnu.org; Mon, 12 Dec 2011 16:04:31 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 
	RP_MATCHES_RCVD autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([140.186.70.17]:53802)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <psusi@HIDDEN>) id 1RaD31-00032P-0K
	for submit <at> debbugs.gnu.org; Mon, 12 Dec 2011 16:04:31 -0500
Received: from eggs.gnu.org ([140.186.70.92]:40246)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <psusi@HIDDEN>) id 1RaD30-0004g8-1U
	for bug-gnu-emacs@HIDDEN; Mon, 12 Dec 2011 16:04:30 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <psusi@HIDDEN>) id 1RaD2x-00031i-SL
	for bug-gnu-emacs@HIDDEN; Mon, 12 Dec 2011 16:04:29 -0500
Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.120]:23103)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <psusi@HIDDEN>) id 1RaD2x-00030l-Oh
	for bug-gnu-emacs@HIDDEN; Mon, 12 Dec 2011 16:04:27 -0500
X-Authority-Analysis: v=2.0 cv=RPYx7ve+ c=1 sm=0 a=/DbS/tiKggfTkRRHPZEB4g==:17
	a=zQGhUK9Iw4MA:10 a=2fwZcE-CYnQA:10 a=8nJEP1OIZ-IA:10
	a=6IiBOVykQrQKd4HTg9YA:9 a=wPNLvfGTeEIA:10
	a=/DbS/tiKggfTkRRHPZEB4g==:117
X-Cloudmark-Score: 0
X-Originating-IP: 67.78.168.186
Received: from [67.78.168.186] ([67.78.168.186:55729] helo=[10.1.1.230])
	by cdptpa-oedge01.mail.rr.com (envelope-from <psusi@HIDDEN>)
	(ecelerity 2.2.3.46 r()) with ESMTP
	id 4B/68-15357-85C66EE4; Mon, 12 Dec 2011 21:04:24 +0000
Message-ID: <4EE66C58.6000303@HIDDEN>
Date: Mon, 12 Dec 2011 16:04:24 -0500
From: Phillip Susi <psusi@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version: 1.0
To: bug-gnu-emacs@HIDDEN
Subject: 23.3; Gud hangs terminal when not running gdb --annotate=3
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -6.0 (------)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.0 (------)

Ever since upgrading to emacs23 I have been unable to run gdb with sudo 
under emacs gud mode ( it never gets my password ).  I have recently 
studied the issue in depth and found that the problem is more broad than 
sudo.  When starting gud mode with M-x gdb, it prompts you for what to 
run, and if you don't run gdb --annotate=3, then gud mode hangs and 
nothing you type is sent to the inferior process.  It seems --annotate=3 
generates some magic output that gud mode is waiting on and until it 
sees it, will not forward anything you type to the inferior process.





Acknowledgement sent to Phillip Susi <psusi@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#10285; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 14 Aug 2021 13:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.