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.
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: Fri, 31 Oct 2014 17:00:04 UTC

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