From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Wang Diancheng Newsgroups: gmane.emacs.bugs Subject: bug#64186: Patch: Suppress deprecated '-gdb-set target-async' warning message in gdb-mi.el Date: Wed, 21 Jun 2023 14:49:01 +0800 Message-ID: References: <87pm5q4mwc.fsf@yahoo.com> <83352m73g3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10826"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 64186@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 21 08:46:50 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 1qBrcA-0002es-Mh for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 21 Jun 2023 08:46:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBrbx-0005jZ-1O; Wed, 21 Jun 2023 02:46:37 -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 1qBrbO-0005dk-TX for bug-gnu-emacs@gnu.org; Wed, 21 Jun 2023 02:46:05 -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 1qBrbO-0004a0-Di for bug-gnu-emacs@gnu.org; Wed, 21 Jun 2023 02:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qBrbN-00082K-Tx for bug-gnu-emacs@gnu.org; Wed, 21 Jun 2023 02:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Wang Diancheng Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Jun 2023 06:46: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.168732993330849 (code B ref 64186); Wed, 21 Jun 2023 06:46:01 +0000 Original-Received: (at 64186) by debbugs.gnu.org; 21 Jun 2023 06:45:33 +0000 Original-Received: from localhost ([127.0.0.1]:60477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBrau-00081U-GX for submit@debbugs.gnu.org; Wed, 21 Jun 2023 02:45:32 -0400 Original-Received: from mail-lj1-f175.google.com ([209.85.208.175]:47286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBras-00081H-PD for 64186@debbugs.gnu.org; Wed, 21 Jun 2023 02:45:31 -0400 Original-Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2b46f5d236dso52406141fa.2 for <64186@debbugs.gnu.org>; Tue, 20 Jun 2023 23:45:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687329925; x=1689921925; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=mW+FLSYp+ntV15Y6PXe/hg2U/YP0PFef15d4jzu1Io8=; b=cuE178gWrvz8FwMfdHjzX11mm5FT4Q8AwL4/95tUieWeI3G0P+uT3O49dPbRmhmm6p jzY3koPFHleetLwogo/XDcamDq5HFk0TaD/s9nWvCelCyeL9iOSCGLRT4I2QlHP3Y+wa N0iiBiwnF1gvdZ8eTTE0cq0MRNy58Ji1Vc65CrhmH1k+T0n3efzIMCRB7MoBf+QP3cE0 kna5S8vynxY4wHar2ZbisqxYqU+8/KtQoloTnNn+dGYArfRQ17fLk/Mi4CsKuodn+hU6 gUdxLteBJDwCmcD9rvIpUVi27osl+DuyY/J4xUFQHAUdOh/jzUqa3twwLpN6Fa8Q+BQi Pyow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687329925; x=1689921925; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mW+FLSYp+ntV15Y6PXe/hg2U/YP0PFef15d4jzu1Io8=; b=TIt/VegUTnoRUI22CsVSwNXWDDCMdGC3foNTmtmS6LXk1kHkJ17xJkvFKj+FpDlVfe 7rsQ9l9foid9I6AnfmQ86ZHjACxApeQWFu2XqPnOaBlWYAvHwvk83ABHJkrzWK09VVXc KyDu+b9ZOnHU2G6jhs24GTuRfimzPGlLIEXbNFlIKCnsZo9NImfDiDaGkg8GfXf55Yvy 610QAyfJTSiwepB75YmaTrivRucUY9n1ubgZg3APcKmJuYC8Rglq1sRY4zT+GMclrE3N htWLkQTKsTpLE8PZ1P/+mhbiPPlN8ZoxVoJxKrhRPmyIPOtGS6qXmPocBZMWtQaYYpJ4 dS1Q== X-Gm-Message-State: AC+VfDzWmEkSqpF2kqj/+pMK17I0F2GTccrlqJcy75mukxaPxMZO08Fy X9rLBTC0XVl8eTEk5Yb1q2/ZtpOZnVtAwIUqYYg= X-Google-Smtp-Source: ACHHUZ6hk7DMjPO1VQPma43l8vIxIKjFe/OfXm/dEBGHngXzMACikx4R2coK/N6B/8cZ6QA5lsnzwbkaOG3x+D7eMOY= X-Received: by 2002:a2e:3513:0:b0:2b4:83c3:d285 with SMTP id z19-20020a2e3513000000b002b483c3d285mr3791726ljz.38.1687329924585; Tue, 20 Jun 2023 23:45:24 -0700 (PDT) In-Reply-To: <83352m73g3.fsf@gnu.org> 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:263791 Archived-At: Eli Zaretskii =E4=BA=8E2023=E5=B9=B46=E6=9C=8820=E6=97=A5=E5= =91=A8=E4=BA=8C 19:55=E5=86=99=E9=81=93=EF=BC=9A > > > Cc: 64186@debbugs.gnu.org > > From: Wang Diancheng > > Date: Tue, 20 Jun 2023 17:25:06 +0800 > > > > Po Lu =E4=BA=8E2023=E5=B9=B46=E6=9C=8820=E6=97=A5= =E5=91=A8=E4=BA=8C 15:24=E5=86=99=E9=81=93=EF=BC=9A > > > > > > 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 th= e > 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. Yes, I agree. Currently gdb-mi doesn't actually support asynchronous execution because of bug#63084. Before it is fixed, to suppress the annoying warning, we can set gdb-non-stop-setting to nil as a workaround.