From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#62697: gdb-mi.el: Change target-async to mi-async Date: Thu, 06 Apr 2023 16:32:46 +0300 Message-ID: <835ya9qgox.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18955"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62697@debbugs.gnu.org To: Gustaf Waldemarson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 06 15:33:28 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pkPjz-0004iS-PY for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Apr 2023 15:33:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pkPjc-0005kU-O9; Thu, 06 Apr 2023 09:33:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pkPja-0005j8-Pe for bug-gnu-emacs@gnu.org; Thu, 06 Apr 2023 09:33:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pkPja-0006rZ-Hu for bug-gnu-emacs@gnu.org; Thu, 06 Apr 2023 09:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pkPjZ-0001pf-VH for bug-gnu-emacs@gnu.org; Thu, 06 Apr 2023 09:33:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Apr 2023 13:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62697 X-GNU-PR-Package: emacs Original-Received: via spool by 62697-submit@debbugs.gnu.org id=B62697.16807879647017 (code B ref 62697); Thu, 06 Apr 2023 13:33:01 +0000 Original-Received: (at 62697) by debbugs.gnu.org; 6 Apr 2023 13:32:44 +0000 Original-Received: from localhost ([127.0.0.1]:53672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkPjH-0001p5-Po for submit@debbugs.gnu.org; Thu, 06 Apr 2023 09:32:44 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55112) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkPjF-0001os-3e for 62697@debbugs.gnu.org; Thu, 06 Apr 2023 09:32:42 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pkPj9-0006bX-4e; Thu, 06 Apr 2023 09:32:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=OPtvW57m4ER+Cl5CEZW59DhiefW/Oh+NCFA/eFxnzq8=; b=FW+klWcZe4Bt /ribfm6PUV3JJ41evz+7vI7aigt2pQ8LxWvSrUpsXV6dsHYS1XZivnY2HIwx08Zm3zN/b8FdvVYJC lm2W+kE5b9Y7qDOto4lYyqk4WHv25LsyuDc2/+qSB9c16h4z0UlIVbZTuA0UZzVmfYl8w4YxSPokt +tldugnbNn3kBxbkdhDHlCYQEHrLvZXC99hVOgzrZrViThMXTAMpVOsHiolRYN7Ks8Yo8TuwvZaeF EAXpkPpLJIO/e9W2Ys0hZjt7wQk+6xOj1oD5fvJhXUwqkqt4CG1k3jr7i7ZeiboJRe0zJgSiVenCr Q3j0fr7fsTORjdUFUNfprQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pkPir-000554-PD; Thu, 06 Apr 2023 09:32:34 -0400 In-Reply-To: (message from Gustaf Waldemarson on Thu, 6 Apr 2023 14:48:20 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:259325 Archived-At: > From: Gustaf Waldemarson > Date: Thu, 6 Apr 2023 14:48:20 +0200 > > This may be a bit too early, given how prevalent it is to be using older > versions of GDB but I figured I should send this patch anyways to get it out of > my mind: > > For GDB version >= 11, starting up a debugging session with 'gdb-mi.el' always > ends with this message: > > > (gdb) Warning: 'set target-async', an alias for the command 'set mi-async', is > > deprecated. Use 'set mi-async'. > > This is a bit of an eyesore and also breaks the initial prompt (although that is > easily fixed by pressing enter, etc, but that may still be confusing for new > users). > > It may be reasonable to either query the GDB version (not sure how though, > unfortunately) and then use the old command (`set target-async`) or execute the > non-deprecated command instead (`set mi-async`), and then possibly trying the > old on if the new one did not work. > > Apparently, `set mi-async` is a GDB 7.8 feature (Released Jul 2014), so this > change may cause incompatibilities with earlier GDB versions. That said, I > suspect that it will only cause a warning message to appear for using an > unsupported command, but unfortunately I don't have an old enough version of GDB > handy to try that out. > > Any strong opinions either way? The attached patch only replaces the old command > with the new one, but I'm open for suggestions. We cannot simply replace the command, as GDB 7.8 is not old enough to assume it isn't used anymore. We could either (1) ask GDB about its version, or (2) filter out the annoying message so it isn't shown to the users; we'd then have to revisit this if/when GDB actually drops the command, if it ever does. Alternative (1) is AFAIR problematic because the initialization of a GDB session under Emacs is entirely asynchronous, so sending a command and waiting for its response before sending the rest is not easy. So I tend to the second alternative. Thanks.