From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 3B7923858C52 for ; Fri, 15 Sep 2023 20:21:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3B7923858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 38FKJxnQ024253 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Sep 2023 16:20:04 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 38FKJxnQ024253 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1694809204; bh=Rwgoju2dKs1OEm457+GPM/lX9e52RJGKtIgrzmjW7/M=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=I/37YmzGyBuWLdYwOfp6vO2H+JChnMAirqt0rZpi3+QLRZ/VltU5/TjiwMhQmiHJD UzaQ0u2HY9Vod+6blITmvXntX44RRTMTUSrQNFIFVTARH8E/hP8DiJCxp1852bpUe0 nsUVAUoLlZeuu1KGV7khGsTVYW1NlrPPtHKJIt6k= Received: from [172.16.0.192] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 519711E092; Fri, 15 Sep 2023 16:19:59 -0400 (EDT) Message-ID: <483f369d-b6d4-49d0-a9ed-1434e12fc287@polymtl.ca> Date: Fri, 15 Sep 2023 16:19:58 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 3/3] gdb/amdgpu: add precise-memory support Content-Language: fr To: Lancelot SIX , Simon Marchi Cc: gdb-patches@sourceware.org References: <20230915145249.22318-1-simon.marchi@efficios.com> <20230915145249.22318-3-simon.marchi@efficios.com> <20230915160454.qoc3pjpl5fyxgz45@octopus> <20230915171601.cpwzr7yxsfqykdlt@octopus> From: Simon Marchi In-Reply-To: <20230915171601.cpwzr7yxsfqykdlt@octopus> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Fri, 15 Sep 2023 20:19:59 +0000 X-Spam-Status: No, score=-3037.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 9/15/23 13:16, Lancelot SIX via Gdb-patches wrote: >>> Moving the initialization in the ctor's body would solve the issue >>> >>> explicit amd_dbgapi_inferior_info (inferior *inf, >>> bool precise_memory_requested = false) >>> : inf {inf} >>> { >>> precise_memory.requested = precise_memory_requested; >>> } >>> >>> The alternative would be to name >>> amd_dbgapi_inferior_info::precise_memory's type and give it a ctor. >> >> In this case I would just do: >> >> diff --git a/gdb/amd-dbgapi-target.c b/gdb/amd-dbgapi-target.c >> index 507824decf8d..40baf156d83f 100644 >> --- a/gdb/amd-dbgapi-target.c >> +++ b/gdb/amd-dbgapi-target.c >> @@ -119,8 +119,10 @@ struct amd_dbgapi_inferior_info >> { >> explicit amd_dbgapi_inferior_info (inferior *inf, >> bool precise_memory_requested = false) >> - : inf {inf}, precise_memory {precise_memory_requested} >> - {} >> + : inf (inf) >> + { >> + precise_memory.requested = precise_memory_requested; >> + } > > That would work for me. Thanks, pushed with that fixed (added your Approved-By). Simon