From unknown Sat Aug 16 16:11:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9853: 24.0.90; gdb-version only set in non-stop mode Resent-From: Ken Brown Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Oct 2011 22:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9853 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 9853@debbugs.gnu.org X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.13194093348087 (code B ref -1); Sun, 23 Oct 2011 22:36:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 Oct 2011 22:35:34 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RI6di-00026O-8L for submit@debbugs.gnu.org; Sun, 23 Oct 2011 18:35:34 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RI6df-000268-5X for submit@debbugs.gnu.org; Sun, 23 Oct 2011 18:35:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RI6c9-0002iE-Dx for submit@debbugs.gnu.org; Sun, 23 Oct 2011 18:33:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:32805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RI6c9-0002i8-C7 for submit@debbugs.gnu.org; Sun, 23 Oct 2011 18:33:57 -0400 Received: from eggs.gnu.org ([140.186.70.92]:42471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RI6c8-0000WV-GF for bug-gnu-emacs@gnu.org; Sun, 23 Oct 2011 18:33:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RI6c7-0002gU-C8 for bug-gnu-emacs@gnu.org; Sun, 23 Oct 2011 18:33:56 -0400 Received: from granite1.mail.cornell.edu ([128.253.83.141]:63035 helo=authusersmtp.mail.cornell.edu) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RI6c7-0002dr-8r for bug-gnu-emacs@gnu.org; Sun, 23 Oct 2011 18:33:55 -0400 Received: from [192.168.1.3] (cpe-67-249-194-47.twcny.res.rr.com [67.249.194.47]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id p9NMXrBm012317 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sun, 23 Oct 2011 18:33:54 -0400 (EDT) Message-ID: <4EA4964E.5040002@cornell.edu> Date: Sun, 23 Oct 2011 18:33:50 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Solaris 9 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.7 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.7 (-----) The variable gdb-version is set in the function gdb-non-stop-handler, which is only called if gdb-non-stop is non-nil. Given that gdb-non-stop-setting is customizable and may well be set to nil, wouldn't it make more sense to get the version some other way? For instance, there's a GDB/MI command -gdb-version that could be used. Also, the -enable-pretty-printing command is sent from gdb-non-stop-handler and so is only sent if gdb-non-stop is non-nil. Is there a reason pretty-printing should only be enabled in non-stop mode. Ken From unknown Sat Aug 16 16:11:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9853: 24.0.90; gdb-version only set in non-stop mode Resent-From: Ken Brown Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Oct 2011 18:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9853 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 9853@debbugs.gnu.org Received: via spool by 9853-submit@debbugs.gnu.org id=B9853.13196523856813 (code B ref 9853); Wed, 26 Oct 2011 18:07:01 +0000 Received: (at 9853) by debbugs.gnu.org; 26 Oct 2011 18:06:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RJ7rt-0001lq-CP for submit@debbugs.gnu.org; Wed, 26 Oct 2011 14:06:25 -0400 Received: from granite1.mail.cornell.edu ([128.253.83.141] helo=authusersmtp.mail.cornell.edu) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RJ7rp-0001lh-LW for 9853@debbugs.gnu.org; Wed, 26 Oct 2011 14:06:23 -0400 Received: from [128.84.234.240] (dhcp240.math.cornell.edu [128.84.234.240]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id p9QI4bAn028308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for <9853@debbugs.gnu.org>; Wed, 26 Oct 2011 14:04:37 -0400 (EDT) Message-ID: <4EA84BA1.6080706@cornell.edu> Date: Wed, 26 Oct 2011 14:04:17 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 References: <4EA4964E.5040002@cornell.edu> In-Reply-To: <4EA4964E.5040002@cornell.edu> Content-Type: multipart/mixed; boundary="------------050902030007020707020108" X-Spam-Score: -5.8 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.8 (-----) This is a multi-part message in MIME format. --------------050902030007020707020108 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 10/23/2011 6:33 PM, Ken Brown wrote: > The variable gdb-version is set in the function gdb-non-stop-handler, > which is only called if gdb-non-stop is non-nil. Given that > gdb-non-stop-setting is customizable and may well be set to nil, > wouldn't it make more sense to get the version some other way? For > instance, there's a GDB/MI command -gdb-version that could be used. After looking through gdb-mi.el more carefully, I see that emacs doesn't really need to know the GDB version. So I withdraw my complaint. But I think the variable gdb-version should probably be renamed to reflect its real purpose, perhaps to gdb-supports-non-stop. > Also, the -enable-pretty-printing command is sent from > gdb-non-stop-handler and so is only sent if gdb-non-stop is non-nil. This still seems wrong, unless there's some reason that pretty-printing is only useful in non-stop mode. The attached patch implements my suggestions (and also makes a couple of whitespace changes). OK to apply? Ken --------------050902030007020707020108 Content-Type: text/plain; name="gdb-version.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gdb-version.patch" === 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 17:49:07 +0000 @@ -225,7 +225,7 @@ (defvar gdb-source-window nil) (defvar gdb-inferior-status nil) (defvar gdb-continuation nil) -(defvar gdb-version nil) +(defvar gdb-supports-non-stop nil) (defvar gdb-filter-output nil "Message to be shown in GUD console. @@ -585,7 +585,7 @@ (if gdb-non-stop (if (and gdb-gud-control-all-threads (not noall) - (string-equal gdb-version "7.0+")) + gdb-supports-non-stop) (concat command " --all ") (gdb-current-context-command command)) command)) @@ -860,6 +860,8 @@ (when gdb-non-stop (gdb-input (list "-gdb-set non-stop 1" 'gdb-non-stop-handler))) + (gdb-input (list "-enable-pretty-printing" 'ignore)) + ;; find source file and compilation directory here (gdb-input ; Needs GDB 6.2 onwards. @@ -878,10 +880,9 @@ (message "This version of GDB doesn't support non-stop mode. Turning it off.") (setq gdb-non-stop nil) - (setq gdb-version "pre-7.0")) - (setq gdb-version "7.0+") - (gdb-input (list "-gdb-set target-async 1" 'ignore)) - (gdb-input (list "-enable-pretty-printing" 'ignore)))) + (setq gdb-supports-non-stop nil)) + (setq gdb-supports-non-stop t) + (gdb-input (list "-gdb-set target-async 1" 'ignore)))) (defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.") @@ -1059,7 +1060,7 @@ (tooltip-identifier-from-point (point))))))) (set-text-properties 0 (length expr) nil expr) (gdb-input - (list (concat"-var-create - * " expr "") + (list (concat "-var-create - * " expr "") `(lambda () (gdb-var-create-handler ,expr))))))) (message "gud-watch is a no-op in this mode.")))) @@ -1687,7 +1688,7 @@ (defun gdb-current-context-command (command) "Add --thread to gdb COMMAND when needed." (if (and gdb-thread-number - (string-equal gdb-version "7.0+")) + gdb-supports-non-stop) (concat command " --thread " gdb-thread-number) command)) @@ -1971,8 +1972,8 @@ (when (not gdb-register-names) (gdb-input (list (concat "-data-list-register-names" - (if (string-equal gdb-version "7.0+") - (concat" --thread " thread-id))) + (if gdb-supports-non-stop + (concat " --thread " thread-id))) 'gdb-register-names-handler))) ;;; Don't set gud-last-frame here as it's currently done in gdb-frame-handler --------------050902030007020707020108-- From unknown Sat Aug 16 16:11:04 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Ken Brown Subject: bug#9853: closed (Re: bug#9853: 24.0.90; gdb-version only set in non-stop mode) Message-ID: References: <4ED5A331.5010603@cornell.edu> <4EA4964E.5040002@cornell.edu> X-Gnu-PR-Message: they-closed 9853 X-Gnu-PR-Package: emacs Reply-To: 9853@debbugs.gnu.org Date: Wed, 30 Nov 2011 03:30:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1322623803-5799-1" This is a multi-part message in MIME format... ------------=_1322623803-5799-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #9853: 24.0.90; gdb-version only set in non-stop mode which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 9853@debbugs.gnu.org. --=20 9853: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D9853 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1322623803-5799-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 9853-done) by debbugs.gnu.org; 30 Nov 2011 03:29:56 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVarr-0001Ux-Rt for submit@debbugs.gnu.org; Tue, 29 Nov 2011 22:29:55 -0500 Received: from granite1.mail.cornell.edu ([128.253.83.141] helo=authusersmtp.mail.cornell.edu) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVarp-0001Uq-Fz for 9853-done@debbugs.gnu.org; Tue, 29 Nov 2011 22:29:54 -0500 Received: from [192.168.1.4] (cpe-67-249-194-47.twcny.res.rr.com [67.249.194.47]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id pAU3TpQ0015860 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for <9853-done@debbugs.gnu.org>; Tue, 29 Nov 2011 22:29:52 -0500 (EST) Message-ID: <4ED5A331.5010603@cornell.edu> Date: Tue, 29 Nov 2011 22:29:53 -0500 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: 9853-done@debbugs.gnu.org Subject: Re: bug#9853: 24.0.90; gdb-version only set in non-stop mode References: <4EA4964E.5040002@cornell.edu> <4EA84BA1.6080706@cornell.edu> In-Reply-To: <4EA84BA1.6080706@cornell.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -5.8 (-----) X-Debbugs-Envelope-To: 9853-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.8 (-----) On 10/26/2011 2:04 PM, Ken Brown wrote: > The attached patch implements my suggestions (and also makes a couple of > whitespace changes). > > OK to apply? Patch applied. Closing bug. ------------=_1322623803-5799-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 23 Oct 2011 22:35:34 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RI6di-00026O-8L for submit@debbugs.gnu.org; Sun, 23 Oct 2011 18:35:34 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RI6df-000268-5X for submit@debbugs.gnu.org; Sun, 23 Oct 2011 18:35:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RI6c9-0002iE-Dx for submit@debbugs.gnu.org; Sun, 23 Oct 2011 18:33:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:32805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RI6c9-0002i8-C7 for submit@debbugs.gnu.org; Sun, 23 Oct 2011 18:33:57 -0400 Received: from eggs.gnu.org ([140.186.70.92]:42471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RI6c8-0000WV-GF for bug-gnu-emacs@gnu.org; Sun, 23 Oct 2011 18:33:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RI6c7-0002gU-C8 for bug-gnu-emacs@gnu.org; Sun, 23 Oct 2011 18:33:56 -0400 Received: from granite1.mail.cornell.edu ([128.253.83.141]:63035 helo=authusersmtp.mail.cornell.edu) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RI6c7-0002dr-8r for bug-gnu-emacs@gnu.org; Sun, 23 Oct 2011 18:33:55 -0400 Received: from [192.168.1.3] (cpe-67-249-194-47.twcny.res.rr.com [67.249.194.47]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id p9NMXrBm012317 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sun, 23 Oct 2011 18:33:54 -0400 (EDT) Message-ID: <4EA4964E.5040002@cornell.edu> Date: Sun, 23 Oct 2011 18:33:50 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: "bug-gnu-emacs@gnu.org" Subject: 24.0.90; gdb-version only set in non-stop mode Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Solaris 9 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.7 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.7 (-----) The variable gdb-version is set in the function gdb-non-stop-handler, which is only called if gdb-non-stop is non-nil. Given that gdb-non-stop-setting is customizable and may well be set to nil, wouldn't it make more sense to get the version some other way? For instance, there's a GDB/MI command -gdb-version that could be used. Also, the -enable-pretty-printing command is sent from gdb-non-stop-handler and so is only sent if gdb-non-stop is non-nil. Is there a reason pretty-printing should only be enabled in non-stop mode. Ken ------------=_1322623803-5799-1--