From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id SDMoAguI9V9hVwAAWB0awg (envelope-from ) for ; Wed, 06 Jan 2021 04:51:07 -0500 Received: by simark.ca (Postfix, from userid 112) id 06AF61F0AA; Wed, 6 Jan 2021 04:51:07 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id AEA2D1E590 for ; Wed, 6 Jan 2021 04:51:06 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7563538708A6; Wed, 6 Jan 2021 09:51:06 +0000 (GMT) Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id A2A9C385702C for ; Wed, 6 Jan 2021 09:51:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A2A9C385702C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wr1-x434.google.com with SMTP id t30so1866970wrb.0 for ; Wed, 06 Jan 2021 01:51:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=+uPyUnKwbHgCl++WdZ+vXk3Fd3Puf34s5P1ww2Mj3zc=; b=dtdYhnZ3bQ9rGKTM3W0uaERJTd4Atr8nZbVQD8DI+X6M+SefPgyOVEOhp0IzgLdZH0 EFcEwjoO5IFTz2cpP1igN2/FnsaJFfoy9Vwal3GOmdRg36rPdwj3B5oVtc3+qgpLMkAj b0riNy6ym/BCuPayjeHpS0ek5aK/Od0ElX67EBhZdcPuJYrdMsFVg3rse4JktBwCG2V9 V9R1g5ZHx8jizyQfVXJd8YHlK97okNXS788FzyFaaXFngforZhH7vpIhoM9cwO0RaY6q 8KvwjKhkl2VV8iqhmBjuA/vC0bfi/SkxftrlbbqqMY+1KEGkngIjqauZrtNbS30eyIMx OcGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=+uPyUnKwbHgCl++WdZ+vXk3Fd3Puf34s5P1ww2Mj3zc=; b=uR03rpzfZqJZpW9TNEF9XlnPtApuf/QhJXmv4mXDHPhjHX2C1Q1YP/JUP9u+qRgnQ5 9cDysW59wUrWyOyGH61qZEY0weh8s6iRLocoe72yHBui+7LuwVtqcp0lVe7zYd0YdzMY gklhZfWLPEPhJQNbVeK2f23FrX290ao1Ebsrp5wKsAtxTtmwOdXxwGS7lJq8LSOA4B9J 4gUVPaz1QdzjBaGSWq2qeA96MXVQMbOLIafxsAwsJoeZZADsu6mEQQQSCawR93xajbRB mt70m+ZyUT9XIqh2TiuHdqKVVKAsfmUBUECyVUmXnt6HiQHHcrXm0NmRvZ1AD9NZqPTI JWYA== X-Gm-Message-State: AOAM532WUKKkOj+y6WWJV2dDbC68WzoYdLI443FNnXhSBIrcSp9bhM6j OdkeAql64fg/D8RrRr+eMSr8+5yp9DdfhA== X-Google-Smtp-Source: ABdhPJy08dkTcLJKx/1Qlxrw4Ai5DaYa1VDyCiToD4ifrowuNbrtiICJE722GderLs/f77a/InFlCw== X-Received: by 2002:a5d:4bc2:: with SMTP id l2mr3556073wrt.204.1609926662841; Wed, 06 Jan 2021 01:51:02 -0800 (PST) Received: from localhost (host86-166-129-230.range86-166.btcentralplus.com. [86.166.129.230]) by smtp.gmail.com with ESMTPSA id j13sm2276079wmi.36.2021.01.06.01.51.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jan 2021 01:51:02 -0800 (PST) Date: Wed, 6 Jan 2021 09:51:01 +0000 From: Andrew Burgess To: Simon Marchi Subject: Re: [PATCH 4/4] gdb: make record-full target clear its async event handler in wait Message-ID: <20210106095101.GH2945@embecosm.com> References: <20201130165251.830482-1-simon.marchi@efficios.com> <20201130165251.830482-5-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201130165251.830482-5-simon.marchi@efficios.com> X-Operating-System: Linux/5.8.13-100.fc31.x86_64 (x86_64) X-Uptime: 09:50:54 up 28 days, 14:35, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] 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: , Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" * Simon Marchi via Gdb-patches [2020-11-30 11:52:51 -0500]: > For the same reason explained in the previous patch (which was for the > record-btrace target), move clearing of the async event handler of the > record-full target to the wait method. > > I'm not sure if/where that target needs to re-set its async event > handler in the wait method. Since it only supports a single thread, > there probably can't be multiple events to report at the same time. > > gdb/ChangeLog: > > * record-full.c (record_full_async_inferior_event_handler): > Don't clear async event handler. > (record_full_base_target::wait): Clear async event handler at > beginning. LGTM. > > Change-Id: I146fbdb53d99e3a32766ac7cd337ac5ed7fd9adf > --- > gdb/record-full.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gdb/record-full.c b/gdb/record-full.c > index 410028aed60..a7bd0bdcd62 100644 > --- a/gdb/record-full.c > +++ b/gdb/record-full.c > @@ -904,7 +904,6 @@ static struct async_event_handler *record_full_async_inferior_event_token; > static void > record_full_async_inferior_event_handler (gdb_client_data data) > { > - clear_async_event_handler (record_full_async_inferior_event_token); > inferior_event_handler (INF_REG_EVENT); > } > > @@ -1464,6 +1463,8 @@ record_full_base_target::wait (ptid_t ptid, struct target_waitstatus *status, > { > ptid_t return_ptid; > > + clear_async_event_handler (record_full_async_inferior_event_token); > + > return_ptid = record_full_wait_1 (this, ptid, status, options); > if (status->kind != TARGET_WAITKIND_IGNORE) > { > -- > 2.29.2 >