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#64186: Patch: Suppress deprecated '-gdb-set target-async' warning message in gdb-mi.el Date: Thu, 29 Jun 2023 09:09:21 +0300 Message-ID: <83leg2u7e6.fsf@gnu.org> References: <87pm5q4mwc.fsf@yahoo.com> <83352m73g3.fsf@gnu.org> <83wmzx3qoj.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20241"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 64186@debbugs.gnu.org To: Wang Diancheng Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 29 08:10:23 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 1qEkrG-00055v-LD for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Jun 2023 08:10:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEkr3-0007FX-78; Thu, 29 Jun 2023 02:10:09 -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 1qEkqw-0007FE-SN for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2023 02:10:04 -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 1qEkqw-0007X9-7e for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2023 02:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qEkqv-000553-JU for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2023 02:10: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, 29 Jun 2023 06:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64186 X-GNU-PR-Package: emacs Original-Received: via spool by 64186-submit@debbugs.gnu.org id=B64186.168801894719444 (code B ref 64186); Thu, 29 Jun 2023 06:10:01 +0000 Original-Received: (at 64186) by debbugs.gnu.org; 29 Jun 2023 06:09:07 +0000 Original-Received: from localhost ([127.0.0.1]:52095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEkq2-00053Y-Iq for submit@debbugs.gnu.org; Thu, 29 Jun 2023 02:09:06 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEkpw-00052y-OM for 64186@debbugs.gnu.org; Thu, 29 Jun 2023 02:09:05 -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 1qEkpr-0007P2-Fu; Thu, 29 Jun 2023 02:08:55 -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=5jC3F4VlNyEVijeg3oyw16GiYG896TfKlSsbjkXokE0=; b=NPv2jDOucyMO kIazo3zAeLEwUnNEwfX+E6ygvxtG0pOhrjYKILXvS8SOP4i3tYW21m7XwTo987F3VHz7124bJ4Hsy 9jBiZ6Z7D8jdoQSyf+QWT7zm5gj1Zf/Te0SfXHL0v+fmdH+lvlwVEvMbIB0ZIMIH81BnHBPh/OBm/ /pNWQmejGc1OGnLUZDCDGxRC14gMQTAyCQObic6fb04GzsqkYIlJn88Rp9gm8iozPjnsC7Q2T42b5 2Q5uzcQ3h6nmLXY/ZOIlvhxyYzsLi3o7phucxDxJeBhKsxJb2/+Ueph8Gizcio9AcyZPSqohdhXZc jf/S8kTh+5X44cZfv5HZcw==; 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 1qEkpq-0001Ef-VL; Thu, 29 Jun 2023 02:08:55 -0400 In-Reply-To: (message from Wang Diancheng on Wed, 28 Jun 2023 11:51:39 +0800) 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:264259 Archived-At: > From: Wang Diancheng > Date: Wed, 28 Jun 2023 11:51:39 +0800 > Cc: luangruo@yahoo.com, 64186@debbugs.gnu.org > > I did some hacks to make gdb-non-stop work, patch is attached. The > patch try to set `gdb-non-stop` when target is running or at first > stop. Sorry for rough patch. I'm new for elisp. Thanks. This looks about right to me, except that "run&" is not the only command whose side effect is that the debuggee is running in the background mode. We also need to at least consider "attach&", I think. Maybe it would be useful to have a list of such commands, so that we could expand it as needed in the future, because currently I don't really understand what triggers background execution that causes "-list-target-features" to report "async". It sounds possible that this happens only after the first command that ends with "&", in which case we will need to add to the list all the commands mentioned in the "Background Execution" node of the GDB manual. This affects the test below: > + ;; Set `gdb-non-stop` when `gdb-last-command` is a CLI background > + ;; `run` command e.g. r& or MI command `-exec-run` > + (when (or (string-match "&\s*$" gdb-last-command) > + (string-match "-exec-run" gdb-last-command)) > + (gdb-try-check-target-async-support)) And I'm not sure I understand the idea behind this part: > @@ -2722,6 +2744,9 @@ gdb-stopped > > ;; Print "(gdb)" to GUD console > (when gdb-first-done-or-error > + ;; If run target with CLI foreground command `run`, `target > + ;; async` can only be checked when target is stopped > + (gdb-try-check-target-async-support) > (setq gdb-filter-output (concat gdb-filter-output gdb-prompt-name))) Can you elaborate? Finally, please don't quote symbols `like this` in comments. Our conventions are to quote symbols 'like this' or `like this'.