all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#25959: No stop button in gdb toolbar
@ 2017-03-03 21:28 Glenn Morris
  2017-03-03 22:35 ` Glenn Morris
  0 siblings, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2017-03-03 21:28 UTC (permalink / raw)
  To: 25959

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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#25959: No stop button in gdb toolbar
  2017-03-03 21:28 bug#25959: No stop button in gdb toolbar Glenn Morris
@ 2017-03-03 22:35 ` Glenn Morris
  2017-03-04  8:54   ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2017-03-03 22:35 UTC (permalink / raw)
  To: 25959

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





^ permalink raw reply related	[flat|nested] 8+ messages in thread

* bug#25959: No stop button in gdb toolbar
  2017-03-03 22:35 ` Glenn Morris
@ 2017-03-04  8:54   ` Eli Zaretskii
  2017-03-06  0:00     ` Glenn Morris
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2017-03-04  8:54 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 25959

> From: Glenn Morris <rgm@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?





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#25959: No stop button in gdb toolbar
  2017-03-04  8:54   ` Eli Zaretskii
@ 2017-03-06  0:00     ` Glenn Morris
  2017-03-06  3:38       ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2017-03-06  0:00 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 25959

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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#25959: No stop button in gdb toolbar
  2017-03-06  0:00     ` Glenn Morris
@ 2017-03-06  3:38       ` Eli Zaretskii
  2017-03-06 18:01         ` Glenn Morris
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2017-03-06  3:38 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 25959

> From: Glenn Morris <rgm@gnu.org>
> Cc: 25959@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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#25959: No stop button in gdb toolbar
  2017-03-06  3:38       ` Eli Zaretskii
@ 2017-03-06 18:01         ` Glenn Morris
  2017-03-06 18:53           ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2017-03-06 18:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 25959

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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#25959: No stop button in gdb toolbar
  2017-03-06 18:01         ` Glenn Morris
@ 2017-03-06 18:53           ` Eli Zaretskii
  2017-03-06 19:41             ` Glenn Morris
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2017-03-06 18:53 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 25959

> From: Glenn Morris <rgm@gnu.org>
> Cc: 25959@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?





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#25959: No stop button in gdb toolbar
  2017-03-06 18:53           ` Eli Zaretskii
@ 2017-03-06 19:41             ` Glenn Morris
  0 siblings, 0 replies; 8+ messages in thread
From: Glenn Morris @ 2017-03-06 19:41 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 25959

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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-03-06 19:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-03 21:28 bug#25959: No stop button in gdb toolbar Glenn Morris
2017-03-03 22:35 ` Glenn Morris
2017-03-04  8:54   ` Eli Zaretskii
2017-03-06  0:00     ` Glenn Morris
2017-03-06  3:38       ` Eli Zaretskii
2017-03-06 18:01         ` Glenn Morris
2017-03-06 18:53           ` Eli Zaretskii
2017-03-06 19:41             ` Glenn Morris

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.