emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Minor gdb-ui patches to make it a bit more robust


From: Nick Roberts
Subject: Re: Minor gdb-ui patches to make it a bit more robust
Date: Tue, 19 Feb 2008 11:12:40 +1300

 > Here are 2 patches which help me deal with gdb-ui.
 > 
 > The first 2 hunks reset gdb-output-sink as it should after starting
 > a new process.  I think this is a plain bug fix, but I'll let
 > Nick decide.

I don't know why you declare gdb-output-sink with a value of nil as it
has no meaning but it's harmless.  In practice, 've not found a need to reset
gdb-output-sink but you presumably have.  So I'm happy if you want to make
these changes.

 > The second hunk make it fallback on the old gud-gdb code in case the
 > prompt appears before we get to receive the expected annotations.
 > I've been using M-x gdb RET with "gdb --fullname emacs" for ever and it
 > took me a while to understand why it suddenly stopped working properly:
 > the behavior is pretty nasty: you get all the expected GDB output but
 > your input isn't sent to the gdb process (because gdb-ui thinks that
 > GDB is still initializing) and completion just hangs (because it sends
 > a command which isn't passed on to the process and then waits for the
 > process to reply).

Using the same startup function (M-x gdb) for graphical mode and text command
mode ("fullname") has given backward compatiblity but caused a lot of grief.

Previously (Emacs 22.1) M-x gdb assumed text command mode until it received
annotations to put it in graphical mode.  This led to error reports where
users wanted graphical mode and had commands in their .gdbinit which started
execution.  My advice was to use M-x gdba.

In EMACS_22_BASE, I switched things round so that M-x gdb assumed graphical
mode until it received a fullname annotation to put it in text command mode.
This solved the above problem.  I also removed M-x gdba and added M-x gud-gdb.

More recently, Robert Marshall made a bug report about start up with M-x gdb
where he entered Gdb user commands before Emacs was ready.  On the *trunk*,
I've solved this by deferring the input rather than discarding it.  I also made
a couple of other related changes, one of which was setting comint-input-sender
to gdb-send earlier.  I think this change has caused the problem you are
seeing.  I've not made this change on EMACS_22_BASE, so I think M-x gdb RET
with "gdb --fullname emacs" will STILL WORK there.

On the trunk, I want to migrate away slightly from text command mode so my
advice there is to use it via M-x gud-gdb now.  I have a patch for gdb-ui.el
which will mean that M-x gdb will only work in graphical mode and doc changes
to reflect this which I propose to commit shortly.

-- 
Nick                                           http://www.inet.net.nz/~nickrob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]