From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Guillaume Salagnac Newsgroups: gmane.emacs.bugs Subject: bug#1155: 23.0.60; GUD hangs Date: Tue, 14 Oct 2008 19:06:52 +1000 Message-ID: <48F4612C.1050204@gmail.com> References: <48F2E984.2080003@gmail.com> <18676.20207.515928.981237@kahikatea.snap.net.nz> Reply-To: Guillaume Salagnac , 1155@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------080704060401080808020009" X-Trace: ger.gmane.org 1223980542 25507 80.91.229.12 (14 Oct 2008 10:35:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Oct 2008 10:35:42 +0000 (UTC) Cc: 1155@emacsbugs.donarmstrong.com To: Nick Roberts Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 14 12:36:39 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KphG5-0007y7-Dk for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Oct 2008 12:36:10 +0200 Original-Received: from localhost ([127.0.0.1]:36869 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KphF0-0004W4-AO for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Oct 2008 06:35:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KpgEC-0008QS-RL for bug-gnu-emacs@gnu.org; Tue, 14 Oct 2008 05:30:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KpgE9-0008Nc-Cr for bug-gnu-emacs@gnu.org; Tue, 14 Oct 2008 05:30:07 -0400 Original-Received: from [199.232.76.173] (port=52626 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KpgE6-0008NB-C3 for bug-gnu-emacs@gnu.org; Tue, 14 Oct 2008 05:30:02 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:37173) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KpgE5-000131-I5 for bug-gnu-emacs@gnu.org; Tue, 14 Oct 2008 05:30:02 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9E9TxlV005294; Tue, 14 Oct 2008 02:29:59 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m9E9F38p001775; Tue, 14 Oct 2008 02:15:03 -0700 X-Loop: don@donarmstrong.com Resent-From: Guillaume Salagnac Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 14 Oct 2008 09:15:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1155 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1155-submit@emacsbugs.donarmstrong.com id=B1155.1223975226463 (code B ref 1155); Tue, 14 Oct 2008 09:15:03 +0000 Original-Received: (at 1155) by emacsbugs.donarmstrong.com; 14 Oct 2008 09:07:06 +0000 Original-Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.224]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9E96wgW000457 for <1155@emacsbugs.donarmstrong.com>; Tue, 14 Oct 2008 02:06:59 -0700 Original-Received: by rv-out-0506.google.com with SMTP id k40so2277998rvb.1 for <1155@emacsbugs.donarmstrong.com>; Tue, 14 Oct 2008 02:06:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type; bh=b14OFGk/mm9Iur2a5rGUuCp8E9On+6/qMUIEAD4xWPY=; b=IpD1Z1/mmeFcc77BQ5UhwQcm1e+v07QbTF2RHs/I33wpdq2im4PSVOHIJIM1qHa/CE Kx+Xm2Zy6ghFOmJTPYhEFKCojbklA2mpDbjaQ112gxiB4wRbK1il/RVz9JiWcO8MA9d9 0S6nmsFB4O3VU41qW0okXqd56FNgLCoHs115Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; b=qi0Bw9gB8JdRJG7paB1KitK2q9uwYwyu1zk+5JuoDwLyRnNayKbA3+/8OOBM7ia5Hx xTXCowV2sp7D+HE8Bmfv/je4aRpVxEUU9Te9X+yeVJSBAkPBcWAHKc17YVHTN0Thf9zG ZpObCH9a0eKimgjWICeVbakOvXAKutNU/xNjk= Original-Received: by 10.141.142.15 with SMTP id u15mr4634136rvn.171.1223975217197; Tue, 14 Oct 2008 02:06:57 -0700 (PDT) Original-Received: from ?140.253.15.89? (midgee-ph.cat.csiro.au [140.253.15.89]) by mx.google.com with ESMTPS id g31sm9580498rvb.7.2008.10.14.02.06.54 (version=SSLv3 cipher=RC4-MD5); Tue, 14 Oct 2008 02:06:56 -0700 (PDT) User-Agent: Thunderbird 2.0.0.17 (X11/20080925) In-Reply-To: <18676.20207.515928.981237@kahikatea.snap.net.nz> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Tue, 14 Oct 2008 05:30:07 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:21466 Archived-At: This is a multi-part message in MIME format. --------------080704060401080808020009 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 > > > > > > h e l p C-c C-c M-x r > > e p o r t - e m a c s - b u g > > What text do you have in the mini-buffer when you type 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 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 ). 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 --------------080704060401080808020009 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
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). 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

--------------080704060401080808020009--