unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10285: 23.3; Gud hangs terminal when not running gdb --annotate=3
@ 2011-12-12 21:04 Phillip Susi
  2011-12-12 21:40 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Phillip Susi @ 2011-12-12 21:04 UTC (permalink / raw)
  To: 10285

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.






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#10285: 23.3; Gud hangs terminal when not running gdb --annotate=3
  2011-12-12 21:04 bug#10285: 23.3; Gud hangs terminal when not running gdb --annotate=3 Phillip Susi
@ 2011-12-12 21:40 ` Stefan Monnier
       [not found]   ` <4EE676D1.5030508@cfl.rr.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2011-12-12 21:40 UTC (permalink / raw)
  To: Phillip Susi; +Cc: 10285

> 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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#10285: 23.3; Gud hangs terminal when not running gdb --annotate=3
       [not found]   ` <4EE676D1.5030508@cfl.rr.com>
@ 2011-12-13 14:21     ` Stefan Monnier
  2021-07-16 13:04       ` bug#10285: gdb-mi should accept some process I/O before GDB actually starts Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2011-12-13 14:21 UTC (permalink / raw)
  To: Phillip Susi; +Cc: 10285

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#10285: gdb-mi should accept some process I/O before GDB actually starts
  2011-12-13 14:21     ` Stefan Monnier
@ 2021-07-16 13:04       ` Lars Ingebrigtsen
  2022-05-06 19:38         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-16 13:04 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 10285, Phillip Susi

Stefan Monnier <monnier@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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#10285: gdb-mi should accept some process I/O before GDB actually starts
  2021-07-16 13:04       ` bug#10285: gdb-mi should accept some process I/O before GDB actually starts Lars Ingebrigtsen
@ 2022-05-06 19:38         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-06 19:38 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 10285, Phillip Susi

Lars Ingebrigtsen <larsi@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





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-06 19:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-12 21:04 bug#10285: 23.3; Gud hangs terminal when not running gdb --annotate=3 Phillip Susi
2011-12-12 21:40 ` Stefan Monnier
     [not found]   ` <4EE676D1.5030508@cfl.rr.com>
2011-12-13 14:21     ` Stefan Monnier
2021-07-16 13:04       ` bug#10285: gdb-mi should accept some process I/O before GDB actually starts Lars Ingebrigtsen
2022-05-06 19:38         ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).