From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id 7C9B23858D35 for ; Sun, 20 Feb 2022 10:47:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7C9B23858D35 Received: by mail-wr1-x42d.google.com with SMTP id d3so6418910wrf.1 for ; Sun, 20 Feb 2022 02:47:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=s+f0A3ENKHXDKYz1SAG/t0o3q2xCBdvx0RkQW5c2kWw=; b=S7BQ+UVLXDKhHpLT8W6DjCPJyThTiPwrUSP28lC8EXt2qZ3UIsP04+Et85Ba6mMDg4 hF3FqFM5AtoV8U8EgEXLqJlXpAMYGmlki9VVIe3aykufaldnf+4fukBfoE569RaWhlB1 umgI9qerhgL1/PcO/781TuGk74CBJQL6QWq/VlBvfSRXwKwiENnA0FKwJkiQpfwEPhLF WLL2wpNJiwspDHLlB474dbtEPO2dr2OfbtWqAYG8xURv6g5WeCvhBDyV74jUB5VMs+OQ dudPCA3KlPJY+A/5xDMbvL4Qr8+RtKJ0Zk7zN/Vi+o0pLuXaAep1aDxmHPqtfHYyR9xl kd6g== X-Gm-Message-State: AOAM5315nwCVjFnLoYzd2C9aHdaHIOIeMJ/E6x55vzLweTnU1w4tOyIc pPheZuTjL5DFkkL5vbPH0Hg9K32x+lQj X-Google-Smtp-Source: ABdhPJxpoZLkUbFT3+NSA7rokleUZKek9HBB1P7ZTQbAOIhnO+qpXDFtjGDzeUP3YmsAGbLw4IUDuA== X-Received: by 2002:a05:6000:10cf:b0:1e6:ac26:ce6 with SMTP id b15-20020a05600010cf00b001e6ac260ce6mr12288423wrx.354.1645354073437; Sun, 20 Feb 2022 02:47:53 -0800 (PST) Received: from takamaka.home (lfbn-reu-1-503-119.w92-130.abo.wanadoo.fr. [92.130.90.119]) by smtp.gmail.com with ESMTPSA id m13-20020a05600c3b0d00b0037c00e01771sm4448420wms.34.2022.02.20.02.47.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Feb 2022 02:47:52 -0800 (PST) Received: by takamaka.home (Postfix, from userid 1000) id 22F76A1610; Sun, 20 Feb 2022 14:47:50 +0400 (+04) Date: Sun, 20 Feb 2022 14:47:50 +0400 From: Joel Brobecker To: John Baldwin Cc: gdb-patches@sourceware.org, Joel Brobecker Subject: Re: [PATCH v5 04/15] Enable async mode on supported targets in target_resume. Message-ID: References: <20220121201631.63530-1-jhb@FreeBSD.org> <20220121201631.63530-5-jhb@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220121201631.63530-5-jhb@FreeBSD.org> X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Feb 2022 10:47:56 -0000 Hi John, > Enabling async mode above the target layer removes duplicate code in > ::resume methods of async-capable targets. Commit 5b6d1e4fa4f > ("Multi-target support") enabled async mode in do_target_resume after > target_resume returns which is a step in this direction. However, > other callers of target_resume such as target_continue do not enable > async mode. Rather than enabling async mode in each of the callers > after target_resume returns, enable async mode at the end of > target_resume. Thanks for this. This is OK. > --- > gdb/infrun.c | 3 --- > gdb/target.c | 3 +++ > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/gdb/infrun.c b/gdb/infrun.c > index 2e7ed15723f..5959c3e6658 100644 > --- a/gdb/infrun.c > +++ b/gdb/infrun.c > @@ -2187,9 +2187,6 @@ do_target_resume (ptid_t resume_ptid, bool step, enum gdb_signal sig) > target_pass_signals (signal_pass); > > target_resume (resume_ptid, step, sig); > - > - if (target_can_async_p ()) > - target_async (1); > } > > /* Resume the inferior. SIG is the signal to give the inferior > diff --git a/gdb/target.c b/gdb/target.c > index 950f2f08e31..b7033eaa930 100644 > --- a/gdb/target.c > +++ b/gdb/target.c > @@ -2673,6 +2673,9 @@ target_resume (ptid_t ptid, int step, enum gdb_signal signal) > thread's stop_pc as side effect. */ > set_executing (curr_target, ptid, true); > clear_inline_frame_state (curr_target, ptid); > + > + if (target_can_async_p ()) > + target_async (1); > } > > /* See target.h. */ > -- > 2.34.1 > -- Joel