GNU bug report logs - #9878
24.0.90; M-x gdb should check whether target supports non-stop mode

Previous Next

Package: emacs;

Reported by: Ken Brown <kbrown <at> cornell.edu>

Date: Wed, 26 Oct 2011 18:28:02 UTC

Severity: normal

Found in version 24.0.90

Done: Ken Brown <kbrown <at> cornell.edu>

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 9878 in the body.
You can then email your comments to 9878 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-gnu-emacs <at> gnu.org:
bug#9878; Package emacs. (Wed, 26 Oct 2011 18:28:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ken Brown <kbrown <at> cornell.edu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 26 Oct 2011 18:28:02 GMT) Full text and rfc822 format available.

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

From: Ken Brown <kbrown <at> cornell.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.90; M-x gdb should check whether target supports non-stop mode
Date: Wed, 26 Oct 2011 14:24:56 -0400
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 ()





Reply sent to Ken Brown <kbrown <at> cornell.edu>:
You have taken responsibility. (Wed, 30 Nov 2011 03:31:02 GMT) Full text and rfc822 format available.

Notification sent to Ken Brown <kbrown <at> cornell.edu>:
bug acknowledged by developer. (Wed, 30 Nov 2011 03:31:02 GMT) Full text and rfc822 format available.

Message #10 received at 9878-done <at> debbugs.gnu.org (full text, mbox):

From: Ken Brown <kbrown <at> cornell.edu>
To: 9878-done <at> debbugs.gnu.org
Subject: Re: bug#9878: 24.0.90; M-x gdb should check whether target supports
	non-stop mode
Date: Tue, 29 Nov 2011 22:30:55 -0500
On 10/26/2011 2:24 PM, Ken Brown wrote:
> The following patch fixes it. OK to apply?

Patch applied.  Closing bug.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 28 Dec 2011 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 173 days ago.

Previous Next


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