From: Guillaume Salagnac <guillaume.salagnac@gmail.com>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: 1155@emacsbugs.donarmstrong.com
Subject: bug#1155: 23.0.60; GUD hangs
Date: Tue, 14 Oct 2008 19:06:52 +1000 [thread overview]
Message-ID: <48F4612C.1050204@gmail.com> (raw)
In-Reply-To: <18676.20207.515928.981237@kahikatea.snap.net.nz>
[-- Attachment #1: Type: text/plain, Size: 5159 bytes --]
Note: it's been a long time between the moment I started writing this
e-mail, and the moment I finished it, so please bear with me until the end.
Nick Roberts wrote:
> > I try to debug a program with M-x gdb, like I did in the past, but it
> > does not seem to work in recent emacsen. gdb starts (in a *gud*
> > buffer) but does not respond to commands. Even a simple "help" does
> > not suceed.
> >
> > Maybe I am doing something wrong (then please correct me), but it does
> > work fine in emacs 21. I experienced the same behaviour here in an emacs
> > 23.0.60.1 and 22.1.1 (all three versions as shipped in ubuntu hardy)
>
> M-x gdb works differently in Emacs 21, but similarly in Emacs 22.1 and
> Emacs 23.0.60. Emacs 22.1 has been included with many distributions including
> Ubuntu Hardy and there have been few bug reports, so I suspect it has something
> to do with your set up.
>
>
Hi,
the behaviour I describe is of course when starting emacs with -Q ;
therefore, I do not suspect my (emacs) setup. For the external setup, I
would be glad to verify it, if you could indicate me any pitfalls. As
long as emacs finds gdb, I thought it should be fine.
BTW, and this drives me crazy, sometimes-it-work-and-sometimes-it-doesnt
(tm). My suspicion is that the problem perhaps comes from the way emacs
communicate with gdb : what if there are different instances of gdb
running at the same time on the machine ? what if there are other
emacsen ? what if those emacsen also happen to run gdbs ? Anyway, when
it does not what I want, I switch to emacs 21, and this one works.
Still, it is not satisfying :-)
> Have you read the node in the Emacs manual about bug reporting?
>
Yes.
> In particular what happens if you don't load your .emacs, i.e., start Emacs
> with "-q"?
>
exactly the same ; actually, this is the first thing it tried (but with -Q)
> What version of GDB are you using?
>
>
GNU gdb 6.8-debian (the one by default in ubuntu hardy)
> > BTW, this is my first bug report, but it is my second try :
> > M-x bug-report seems to be address messages by default to
> > emacs-pretest-bug@gnu.org that goes nowhere. But maybe I am perhaps
> > doing something wrong.
>
> emacs-pretest-bug@gnu.org is an active mailing list and the right one for
> reporting bugs in Emacs 23.0.60. Maybe there is something wrong with your
> mail server.
>
I don't know: on http://ists.gnu.org/archive/html/emacs-pretest-bug ,
the last message is from july 2007, saying that the list is
discontinued. But maybe I missed something.
> > ...
> > Recent input:
> > M-x g d b <return> <backspace> <backspace> <backspace>
> > <backspace> <backspace> <backspace> <backspace> <backspace>
> > <backspace> <backspace> <backspace> <backspace> <backspace>
> > <backspace> <return> h e l p <return> C-c C-c M-x r
> > e p o r t - e m a c s - b u g <return>
>
> What text do you have in the mini-buffer when you type <return> for the
> second time?
>
When I type "M-x gdb", the text by default in the minibuffer is "Run
gdb (like this): gdb --annotate=3 foo", where "foo" is a random
executable file in my home directory. All the <backspace>s are to remove
everything up to just "gdb" (the second one of course ; I do not modify
the prompt)
But hey ! that does seem to make a difference. In my home directory, I
start emacs 23 with -Q and I type M-x gdb. The text by default is "gdb
--annotate=3 .zshrc". If I just press return, I can ask for "help" and
get gdb help. If I remove everything but "gdb", so as to choose my
"file" and my "set args" later, it does not work.
Hoho (typing as I'm reading the web) : the online documentation of gdb
(not the man page, not the info page, not the gdb --help) mention this
option, and says :
http://sourceware.org/gdb/current/onlinedocs/gdb_3.html#IDX37
|-annotate level|
This option sets the /annotation level/ inside GDB. Its effect is
identical to using `set annotate level' (see section 25. GDB
Annotations
<http://sourceware.org/gdb/current/onlinedocs/gdb_26.html#SEC656>).
The annotation level controls how much information GDB prints
together with its prompt, values of expressions, source lines, and
other types of output. Level 0 is the normal, level 1 is for use
when GDB is run as a subprocess of GNU Emacs, level 3 is the maximum
annotation suitable for programs that control GDB, and level 2 has
been deprecated.
Having played now a little bit with this option, I disagree with this
documentation. level 1 and level 2 do not make my emacs happy, and GDB
is still irresponsive. However, the solution to my problem seems to be
this "annotation level 3" thing.
Now remains the questions as to why it does work like a charm in emacs
21 without this option, and also why the necessity of this option for
gud is documented nowhere (if I, the end user, am not allowed to remove
this option from the command line without breaking GUD, either I should
not be allowed to remove it, or at least I should be warned.)
But yes, for the moment I am back in emacs 23 for my debugging activites.
yay !
Thanks again,
-G
[-- Attachment #2: Type: text/html, Size: 6782 bytes --]
next prev parent reply other threads:[~2008-10-14 9:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-13 6:24 bug#1155: 23.0.60; GUD hangs Guillaume Salagnac
2008-10-14 7:49 ` Nick Roberts
2008-10-14 9:06 ` Guillaume Salagnac [this message]
2008-10-14 10:10 ` Nick Roberts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48F4612C.1050204@gmail.com \
--to=guillaume.salagnac@gmail.com \
--cc=1155@emacsbugs.donarmstrong.com \
--cc=nickrob@snap.net.nz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.