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: Tue, 20 Jun 2023 14:55:56 +0300 Message-ID: <83352m73g3.fsf@gnu.org> References: <87pm5q4mwc.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6630"; 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 Tue Jun 20 13:56:26 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 1qBZyC-0001WA-Ri for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Jun 2023 13:56:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBZxs-00075E-EG; Tue, 20 Jun 2023 07:56: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 1qBZxr-00073j-1n for bug-gnu-emacs@gnu.org; Tue, 20 Jun 2023 07:56:03 -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 1qBZxq-0007HI-PP for bug-gnu-emacs@gnu.org; Tue, 20 Jun 2023 07:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qBZxq-0005pt-6q for bug-gnu-emacs@gnu.org; Tue, 20 Jun 2023 07:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Jun 2023 11:56:02 +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.168726215822424 (code B ref 64186); Tue, 20 Jun 2023 11:56:02 +0000 Original-Received: (at 64186) by debbugs.gnu.org; 20 Jun 2023 11:55:58 +0000 Original-Received: from localhost ([127.0.0.1]:58234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBZxm-0005pc-9u for submit@debbugs.gnu.org; Tue, 20 Jun 2023 07:55:58 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBZxk-0005pQ-Nv for 64186@debbugs.gnu.org; Tue, 20 Jun 2023 07:55:57 -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 1qBZxf-0007Fd-Bl; Tue, 20 Jun 2023 07:55:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ZJb8PovlJJ/lyIAD+YWPN3CT4beP5Tob5miHhBRXeqI=; b=F1TM9sgSV36dMuAAniKE n95TuXgCKZq8r3ve1OuFMmSovMMa7aXp4IMUufljiivz+fmlwtp/ijhe/mep03OySrRJhIrN2RvDQ wJv0WY3gz1kdsu2j8gRsFcS+UsDNz/sF7WjNSCxlBAzNJYxECrBABQ7DuovXZkNMk67spQ8WUUOfE DfyJbXFlQcKw9bWggQ5w8cnltwUq7N5HsPIjEp9irKQ33Y5MHUuTJCBcRZdBo60P1XEydxvrumiQE wX3krfvbXiRwW6D7e0P0Cy5q9MMXK9D/miU7eniMJ4kyrn14DdVL9+BgzkuHb4JimjJ+f1VWbmrrC r4b2mNk7dUTblQ==; 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 1qBZxe-0005v6-RH; Tue, 20 Jun 2023 07:55:51 -0400 In-Reply-To: (message from Wang Diancheng on Tue, 20 Jun 2023 17:25:06 +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:263755 Archived-At: > Cc: 64186@debbugs.gnu.org > From: Wang Diancheng > Date: Tue, 20 Jun 2023 17:25:06 +0800 > > Po Lu 于2023年6月20日周二 15:24写道: > > > > What about versions of GDB earlier than 7.7? We should detect them, and > > use `set mi-async' there. > > > Like other places of gdb-mi.el, function gdb-set-mi-async-handler() > will use 'set target-async' if GDB (versions earlier than 7.7) reports > "No symbol". Isn't that too late, though? The GDB manual says: On some targets, GDB is capable of processing MI commands even while the target is running. This is called "asynchronous command execution" (*note Background Execution::). The frontend may specify a preference for asynchronous execution using the '-gdb-set mi-async 1' command, which should be emitted before either running the executable or attaching to the target. However, the gdb-input call sends the request without waiting for the response, so the handler of the response will be invoked much later, after GDB already processed quite a few commands sent to it by Emacs in the meantime. Thus, by the time gdb-set-mi-async-handler is called, and we see the "No symbol" thingy and send the target-async command instead, it could be too late, because the executable was already run. There's actually more here than meets the eye; see bug#63084. Given all that mess, I wonder if "M-x gdb" in its current shape indeed supports the asynchronous execution. If it doesn't, we may be better off not sending that command at all for now, until bug#63084 is fixed.