GNU bug report logs - #1155
23.0.60; GUD hangs

Previous Next

Package: emacs;

Reported by: Guillaume Salagnac <guillaume.salagnac <at> gmail.com>

Date: Mon, 13 Oct 2008 06:30:03 UTC

Severity: normal

Done: Glenn Morris <rgm <at> gnu.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 1155 in the body.
You can then email your comments to 1155 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-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1155; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Guillaume Salagnac <guillaume.salagnac <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Guillaume Salagnac <guillaume.salagnac <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org, guillaume.salagnac <at> gmail.com
Subject: 23.0.60; GUD hangs
Date: Mon, 13 Oct 2008 16:24:04 +1000
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)

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 <at> gnu.org that goes nowhere. But maybe I am perhaps
doing something wrong.

Edit: third try, actually, because this message has just been sent blank 
by emacs. I try again from thunderbird (fortunately I had backuped the 
content of the message this time)

-Guillaume


In GNU Emacs 23.0.60.1 (i486-pc-linux-gnu, GTK+ Version 2.12.9)
of 2008-03-20 on vernadsky, modified by Debian
(emacs-snapshot package, version 1:20080228-1ubuntu1)
Windowing system distributor `The X.Org Foundation', version 11.0.10400090
configured using `configure  '--build' 'i486-linux-gnu' '--host' 
'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' 
'--libexecdir=/usr/lib' '--localstatedir=/var' 
'--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' 
'--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.0.60/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.0.60/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.0.60/leim' 
'--with-x=yes' '--with-x-toolkit=gtk' '--enable-font-backend' 
'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 
'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g 
-Wl,--as-needed' 'CPPFLAGS=''

Important settings:
 value of $LC_ALL: nil
 value of $LC_COLLATE: nil
 value of $LC_CTYPE: nil
 value of $LC_MESSAGES: nil
 value of $LC_MONETARY: nil
 value of $LC_NUMERIC: nil
 value of $LC_TIME: nil
 value of $LANG: en_AU.UTF-8
 value of $XMODIFIERS: nil
 locale-coding-system: utf-8-unix
 default-enable-multibyte-characters: t

Major mode: Debugger

Minor modes in effect:
 tooltip-mode: t
 tool-bar-mode: t
 mouse-wheel-mode: t
 menu-bar-mode: t
 file-name-shadow-mode: t
 global-font-lock-mode: t
 font-lock-mode: t
 blink-cursor-mode: t
 global-auto-composition-mode: t
 auto-composition-mode: t
 auto-compression-mode: t
 line-number-mode: t
 transient-mark-mode: t

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>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.






Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1155; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Nick Roberts <nickrob <at> snap.net.nz>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #10 received at 1155 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Nick Roberts <nickrob <at> snap.net.nz>
To: Guillaume Salagnac <guillaume.salagnac <at> gmail.com>,
        1155 <at> debbugs.gnu.org
Subject: Re: bug#1155: 23.0.60; GUD hangs
Date: Tue, 14 Oct 2008 20:49:03 +1300
 > 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.

Have you read the node in the Emacs manual about bug reporting?

In particular what happens if you don't load your .emacs, i.e., start Emacs
with "-q"?

What version of GDB are you using?

 > 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 <at> gnu.org that goes nowhere. But maybe I am perhaps
 > doing something wrong.

emacs-pretest-bug <at> 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.

 > ...
 > 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?

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




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1155; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Guillaume Salagnac <guillaume.salagnac <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #15 received at 1155 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Guillaume Salagnac <guillaume.salagnac <at> gmail.com>
To: Nick Roberts <nickrob <at> snap.net.nz>
Cc: 1155 <at> debbugs.gnu.org
Subject: Re: bug#1155: 23.0.60; GUD hangs
Date: Tue, 14 Oct 2008 19:06:52 +1000
[Message part 1 (text/plain, inline)]
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 <at> gnu.org that goes nowhere. But maybe I am perhaps
>  > doing something wrong.
>
> emacs-pretest-bug <at> 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

[Message part 2 (text/html, inline)]

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1155; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Nick Roberts <nickrob <at> snap.net.nz>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #20 received at 1155 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Nick Roberts <nickrob <at> snap.net.nz>
To: Guillaume Salagnac <guillaume.salagnac <at> gmail.com>
Cc: 1155 <at> debbugs.gnu.org
Subject: Re: bug#1155: 23.0.60; GUD hangs
Date: Tue, 14 Oct 2008 23:10:03 +1300
 > 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 :-)

Emacs communicates with GDB through a terminal (or a pipe) so it shouldn't
matter if there are different instances of gdb, or other emacsen.

 > > emacs-pretest-bug <at> 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.

I believe that emacs-pretest-bug is aliased to emacs-devel but if the
subject header starts with 23.0.60; it goes through Don Armstrong's bug
tracker.

 > >  > ...
 > >  > 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)

You need to, at least, keep "gdb --annotate=3"

 > 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.

It's unlikely that you want to debug .zshrc (Emacs just looks for the last
executable to be modified in default-directory) but it should look something
like:

"Run gdb (like this): gdb --annotate=3 myprog

when you press <RET> in the mini-buffer, where myprog is the name your
executable (use an absolute filename if you're not sure what directory you're
in).

 > 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

The node "GDB Graphical Interface" in the Emacs info manual is probably of more
interest to you.  If you have the tool bar present, which can be useful for
debugging, you can click on the Info button (bulb or question mark) to get to
this node from the GUD buffer.

 > ...
 > 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.)

Emacs 21 used "--fullname" which is the same as "--annotate=1" but it was
hidden from the user.  So yes, people coming from Emacs 21 have a different
expectation and you have a point.  However, the user may want to change 
the pathname to GDB, for example.

C-h f gdb<RET>

says

  The option "--annotate=3" must be included in this value.  To
  run GDB in text command mode, use `gud-gdb'.  You need to use
  text command mode to debug multiple programs within one Emacs
  session.

at the end of the *Help* buffer.  "Text command mode" is like M-x gdb
in Emacs 21.

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




bug closed, send any further explanations to Guillaume Salagnac <guillaume.salagnac <at> gmail.com> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Mon, 01 Dec 2008 21:55:05 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Tue, 30 Dec 2008 15:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 267 days ago.

Previous Next


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