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

Previous Next

Package: emacs;

Reported by: Phillip Susi <psusi <at> cfl.rr.com>

Date: Mon, 12 Dec 2011 21:06:02 UTC

Severity: normal

Found in versions 24.1, 23.3

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10285 in the body.
You can then email your comments to 10285 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#10285; Package emacs. (Mon, 12 Dec 2011 21:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Phillip Susi <psusi <at> cfl.rr.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 12 Dec 2011 21:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Phillip Susi <psusi <at> cfl.rr.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.3; Gud hangs terminal when not running gdb --annotate=3
Date: Mon, 12 Dec 2011 16:04:24 -0500
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.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10285; Package emacs. (Mon, 12 Dec 2011 21:42:02 GMT) Full text and rfc822 format available.

Message #8 received at 10285 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Phillip Susi <psusi <at> cfl.rr.com>
Cc: 10285 <at> debbugs.gnu.org
Subject: Re: bug#10285: 23.3;
	Gud hangs terminal when not running gdb --annotate=3
Date: Mon, 12 Dec 2011 16:40:39 -0500
> 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 <at> gnu.org:
bug#10285; Package emacs. (Tue, 13 Dec 2011 14:23:02 GMT) Full text and rfc822 format available.

Message #11 received at 10285 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Phillip Susi <psusi <at> cfl.rr.com>
Cc: 10285 <at> debbugs.gnu.org
Subject: Re: bug#10285: 23.3;
	Gud hangs terminal when not running gdb --annotate=3
Date: Tue, 13 Dec 2011 09:21:29 -0500
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




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 <at> iro.umontreal.ca> to control <at> debbugs.gnu.org. (Tue, 13 Dec 2011 14:23:02 GMT) Full text and rfc822 format available.

bug Marked as found in versions 24.1. Request was from Stefan Monnier <monnier <at> iro.umontreal.ca> to control <at> debbugs.gnu.org. (Tue, 13 Dec 2011 14:23:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10285; Package emacs. (Fri, 16 Jul 2021 13:05:02 GMT) Full text and rfc822 format available.

Message #18 received at 10285 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 10285 <at> debbugs.gnu.org, Phillip Susi <psusi <at> cfl.rr.com>
Subject: Re: bug#10285: gdb-mi should accept some process I/O before GDB
 actually starts
Date: Fri, 16 Jul 2021 15:04:17 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> 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




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 16 Jul 2021 13:05:02 GMT) Full text and rfc822 format available.

Removed tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 14 Aug 2021 13:36:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10285; Package emacs. (Fri, 06 May 2022 19:39:02 GMT) Full text and rfc822 format available.

Message #25 received at 10285 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 10285 <at> debbugs.gnu.org, Phillip Susi <psusi <at> cfl.rr.com>
Subject: Re: bug#10285: gdb-mi should accept some process I/O before GDB
 actually starts
Date: Fri, 06 May 2022 21:38:38 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

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

There wasn't any response in half a year here, so it seems unlikely that
there'll be any further development in this bug report, and I'm
therefore closing it.  If somebody has a recipe, please respond to the
debbugs address and we'll reopen.

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




bug closed, send any further explanations to 10285 <at> debbugs.gnu.org and Phillip Susi <psusi <at> cfl.rr.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 06 May 2022 19:39:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 04 Jun 2022 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 35 days ago.

Previous Next


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