GNU bug report logs - #25959
No stop button in gdb toolbar

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Fri, 3 Mar 2017 21:29:02 UTC

Severity: normal

Found in version 24.4

To reply to this bug, email your comments to 25959 AT debbugs.gnu.org.

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-gnu-emacs <at> gnu.org:
bug#25959; Package emacs. (Fri, 03 Mar 2017 21:29:02 GMT) Full text and rfc822 format available.

Message #3 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: submit <at> debbugs.gnu.org
Subject: No stop button in gdb toolbar
Date: Fri, 03 Mar 2017 16:28:11 -0500
Package: emacs
Version: 24.4

emacs -Q -f gdb
gdb -i=mi a.out RET

Choose "Go" button in toolbar, program starts running, "Go" disappears.
Now there should be a "Stop" button, but there isn't.

gdb-show-stop-p returns nil because gdb-running-threads-count is 0.

It works in 24.3, and fails in 24.4 through to current master.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25959; Package emacs. (Fri, 03 Mar 2017 22:36:01 GMT) Full text and rfc822 format available.

Message #6 received at 25959 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 25959 <at> debbugs.gnu.org
Cc: jpgravel <at> gmail.com
Subject: Re: bug#25959: No stop button in gdb toolbar
Date: Fri, 03 Mar 2017 17:35:06 -0500
Glenn Morris wrote:

> emacs -Q -f gdb
> gdb -i=mi a.out RET
>
> Choose "Go" button in toolbar, program starts running, "Go" disappears.
> Now there should be a "Stop" button, but there isn't.
>
> gdb-show-stop-p returns nil because gdb-running-threads-count is 0.
>
> It works in 24.3, and fails in 24.4 through to current master.

Reverting 2e78e6a fixes this for me, so I've cc'd the author of that change.


commit 2e78e6a
Author: Jean-Philippe Gravel <jpgravel <at> gmail.com>
Date:   Tue May 14 14:34:13 2013 -0400

    * progmodes/gdb-mi.el (gdb-running, gdb-starting): Remove
    signals for which replies are never received.

diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 2799eec..a6ad573 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -2376,8 +2376,7 @@ gdb-running
    (propertize gdb-inferior-status 'face font-lock-type-face))
   (when (not gdb-non-stop)
     (setq gud-running t))
-  (setq gdb-active-process t)
-  (gdb-emit-signal gdb-buf-publisher 'update-threads))
+  (setq gdb-active-process t))
 
 (defun gdb-starting (_output-field _result)
   ;; CLI commands don't emit ^running at the moment so use gdb-running too.
@@ -2385,11 +2384,7 @@ gdb-starting
   (gdb-force-mode-line-update
    (propertize gdb-inferior-status 'face font-lock-type-face))
   (setq gdb-active-process t)
-  (setq gud-running t)
-  ;; GDB doesn't seem to respond to -thread-info before first stop or
-  ;; thread exit (even in non-stop mode), so this is useless.
-  ;; Behavior may change in the future.
-  (gdb-emit-signal gdb-buf-publisher 'update-threads))
+  (setq gud-running t))
 
 ;; -break-insert -t didn't give a reason before gdb 6.9
 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25959; Package emacs. (Sat, 04 Mar 2017 08:55:01 GMT) Full text and rfc822 format available.

Message #9 received at 25959 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 25959 <at> debbugs.gnu.org
Subject: Re: bug#25959: No stop button in gdb toolbar
Date: Sat, 04 Mar 2017 10:54:30 +0200
> From: Glenn Morris <rgm <at> gnu.org>
> Date: Fri, 03 Mar 2017 17:35:06 -0500
> 
> Glenn Morris wrote:
> 
> > emacs -Q -f gdb
> > gdb -i=mi a.out RET
> >
> > Choose "Go" button in toolbar, program starts running, "Go" disappears.
> > Now there should be a "Stop" button, but there isn't.
> >
> > gdb-show-stop-p returns nil because gdb-running-threads-count is 0.
> >
> > It works in 24.3, and fails in 24.4 through to current master.
> 
> Reverting 2e78e6a fixes this for me, so I've cc'd the author of that change.

What version of GDB do you have?

FWIW, the "Stop" button does appear for me, so this could depend on
whether GDB and/or the target supports non-stop execution (mine
doesn't).  My GDB version is 7.12, for the record.

Anyway, I guess reverting only the first hunk of 2e78e6a suffices?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25959; Package emacs. (Mon, 06 Mar 2017 00:01:02 GMT) Full text and rfc822 format available.

Message #12 received at 25959 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25959 <at> debbugs.gnu.org
Subject: Re: bug#25959: No stop button in gdb toolbar
Date: Sun, 05 Mar 2017 19:00:15 -0500
Eli Zaretskii wrote:

>> Reverting 2e78e6a fixes this for me, so I've cc'd the author of that change.
>
> What version of GDB do you have?

I should have said:
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-94.el7

> FWIW, the "Stop" button does appear for me, so this could depend on
> whether GDB and/or the target supports non-stop execution (mine
> doesn't).

Mine apparently supports non-stop.

> Anyway, I guess reverting only the first hunk of 2e78e6a suffices?

Right.

Though I don't know if it is safe to revert any of 2e78e6a, given that
it says these signals never reply, and comments in
https://debbugs.gnu.org/13845#8
talks about gdb replying in order.
(My comment may be nonsense, I know nothing about this code.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25959; Package emacs. (Mon, 06 Mar 2017 03:39:02 GMT) Full text and rfc822 format available.

Message #15 received at 25959 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 25959 <at> debbugs.gnu.org
Subject: Re: bug#25959: No stop button in gdb toolbar
Date: Mon, 06 Mar 2017 05:38:02 +0200
> From: Glenn Morris <rgm <at> gnu.org>
> Cc: 25959 <at> debbugs.gnu.org
> Date: Sun, 05 Mar 2017 19:00:15 -0500
> 
> > What version of GDB do you have?
> 
> I should have said:
> GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-94.el7

Hmm... that might be too old.  Is there any chance you could try with
a newer one?  Or maybe you already did?

> > Anyway, I guess reverting only the first hunk of 2e78e6a suffices?
> 
> Right.
> 
> Though I don't know if it is safe to revert any of 2e78e6a, given that
> it says these signals never reply, and comments in
> https://debbugs.gnu.org/13845#8
> talks about gdb replying in order.

My problem with the original report is that the recipe for reproducing
the bug is so complex I cannot wrap my head around what's going on
there.  One way forard could be to see if reverting the first hunk of
2e78e6a reintroduces the problem in that recipe.  Or maybe we should
just revert it and see if anyone hollers.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25959; Package emacs. (Mon, 06 Mar 2017 18:02:01 GMT) Full text and rfc822 format available.

Message #18 received at 25959 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25959 <at> debbugs.gnu.org
Subject: Re: bug#25959: No stop button in gdb toolbar
Date: Mon, 06 Mar 2017 13:01:08 -0500
Eli Zaretskii wrote:

> Hmm... that might be too old.  Is there any chance you could try with
> a newer one?

With:

  GNU gdb (GDB) Red Hat Enterprise Linux 7.11-67.el7

the stop buttons appears, but clicking it doesn't stop the program.
gdb-running-threads-count remains at 0 while the process is running.
gdb-non-stop is now nil.

If I type: C-c C-c the program stops and a Go button appears.
If I click that, I get both a Stop and a Go button.
gdb-stopped-threads-count is 1, and gdb-running-threads-count remains
at 0. This is with gdb-gud-control-all-threads t, the default.

The program being debugged is just an infinite while loop.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25959; Package emacs. (Mon, 06 Mar 2017 18:55:02 GMT) Full text and rfc822 format available.

Message #21 received at 25959 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 25959 <at> debbugs.gnu.org
Subject: Re: bug#25959: No stop button in gdb toolbar
Date: Mon, 06 Mar 2017 20:53:57 +0200
> From: Glenn Morris <rgm <at> gnu.org>
> Cc: 25959 <at> debbugs.gnu.org
> Date: Mon, 06 Mar 2017 13:01:08 -0500
> 
> With:
> 
>   GNU gdb (GDB) Red Hat Enterprise Linux 7.11-67.el7
> 
> the stop buttons appears, but clicking it doesn't stop the program.
> gdb-running-threads-count remains at 0 while the process is running.
> gdb-non-stop is now nil.
> 
> If I type: C-c C-c the program stops and a Go button appears.
> If I click that, I get both a Stop and a Go button.
> gdb-stopped-threads-count is 1, and gdb-running-threads-count remains
> at 0. This is with gdb-gud-control-all-threads t, the default.

And if you revert that hunk, then the behavior is more according to
expectations, with GDB 7.11?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25959; Package emacs. (Mon, 06 Mar 2017 19:42:02 GMT) Full text and rfc822 format available.

Message #24 received at 25959 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25959 <at> debbugs.gnu.org
Subject: Re: bug#25959: No stop button in gdb toolbar
Date: Mon, 06 Mar 2017 14:41:17 -0500
Eli Zaretskii wrote:

> And if you revert that hunk, then the behavior is more according to
> expectations, with GDB 7.11?

On clicking Go, gdb-running-threads-count remains at 0.
The Stop button still doesn't stop.
On typing C-c C-c I get
  WARNING! Discarding GDB handler with token #18
On clicking Go I get just a Stop button.
At this point the Stop button works.




This bug report was last modified 8 years and 102 days ago.

Previous Next


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