unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9878: 24.0.90; M-x gdb should check whether target supports non-stop mode
@ 2011-10-26 18:24 Ken Brown
  2011-11-30  3:30 ` Ken Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Ken Brown @ 2011-10-26 18:24 UTC (permalink / raw)
  To: 9878

If non-stop mode is set, M-x gdb tries to set the target for running in 
non-stop mode; see line 883 of gdb-mi.el.  But there's no check to see 
if that succeeded.  If it didn't, any attempt to run the program results 
in the error message "The target does not support running in non-stop 
mode.", which might mystify many users.

This is a problem on Cygwin, where apparently no targets support running 
in non-stop mode (as far as I can tell), and it may also be a problem on 
Windows; see

   http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6072

To reproduce:

emacs -Q
M-x gdb RET
<delete any file name in the prompt, if necessary, and enter one that 
does not support running in non-stop mode>

The following patch fixes it.  OK to apply?

=== modified file 'lisp/progmodes/gdb-mi.el'
--- lisp/progmodes/gdb-mi.el    2011-10-06 16:11:38 +0000
+++ lisp/progmodes/gdb-mi.el    2011-10-26 16:44:38 +0000
@@ -881,8 +881,17 @@
         (setq gdb-version "pre-7.0"))
      (setq gdb-version "7.0+")
      (gdb-input (list "-gdb-set target-async 1" 'ignore))
+    (gdb-input (list "-list-target-features" 'gdb-check-target-async))
      (gdb-input (list "-enable-pretty-printing" 'ignore))))

+(defun gdb-check-target-async ()
+  (goto-char (point-min))
+  (unless (re-search-forward "async" nil t
+    (message
+     "Target doesn't support non-stop mode.  Turning it off.")
+    (setq gdb-non-stop nil)
+    (gdb-input (list "-gdb-set non-stop 0" 'ignore))))
+
  (defvar gdb-define-alist nil "Alist of #define directives for GUD 
tooltips.")

  (defun gdb-create-define-alist ()






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

* bug#9878: 24.0.90; M-x gdb should check whether target supports non-stop mode
  2011-10-26 18:24 bug#9878: 24.0.90; M-x gdb should check whether target supports non-stop mode Ken Brown
@ 2011-11-30  3:30 ` Ken Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Ken Brown @ 2011-11-30  3:30 UTC (permalink / raw)
  To: 9878-done

On 10/26/2011 2:24 PM, Ken Brown wrote:
> The following patch fixes it. OK to apply?

Patch applied.  Closing bug.






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

end of thread, other threads:[~2011-11-30  3:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-26 18:24 bug#9878: 24.0.90; M-x gdb should check whether target supports non-stop mode Ken Brown
2011-11-30  3:30 ` Ken Brown

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).