From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 906843858C50 for ; Fri, 10 Feb 2023 02:42:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 906843858C50 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 3638B1E110; Thu, 9 Feb 2023 21:42:12 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1675996932; bh=6tW/prtv5CD2NskQefPOpn0qPgIM/acsrPf0I1jR+70=; h=Date:Subject:To:References:From:In-Reply-To:From; b=aa1FzLnLOlYcZdCLzfzQQaEcGAp27ZvXj2Ub6MbV48vT56z8jFtFr/A94JeigQI4Y tzWue3XWmKKvcqCl1sEky3ScitQI5yTDhDASuU+rmK3Vs+l9AgniU3LGBOn2EcCNDz mSjMobvvXb0VQkT7ahGpOazouSVF/qHKg+Y7ywqE= Message-ID: <608d5e68-9d18-e0dd-87b9-3cbfce136e87@simark.ca> Date: Thu, 9 Feb 2023 21:42:11 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH 35/47] Turn value_copy into a method Content-Language: en-US To: Tom Tromey , gdb-patches@sourceware.org References: <20230209-submit-value-fixups-2023-v1-0-55dc2794dbb9@tromey.com> <20230209-submit-value-fixups-2023-v1-35-55dc2794dbb9@tromey.com> From: Simon Marchi In-Reply-To: <20230209-submit-value-fixups-2023-v1-35-55dc2794dbb9@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,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: > diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c > index c3524a9c9a1..1ffdb4bf33d 100644 > --- a/gdb/breakpoint.c > +++ b/gdb/breakpoint.c > @@ -4408,7 +4408,7 @@ bpstat::bpstat (const bpstat &other) > print_it (other.print_it) > { > if (other.old_val != NULL) > - old_val = release_value (value_copy (other.old_val.get ())); > + old_val = release_value (other.old_val.get ()->copy ()); I spotted cases like this, where the `.get ()` could be dropped (one advantage of switching to methods`. Perhaps there are other instances in the other patches, but I just happened to spot that one. I guess it's possible to remove them using a script too, I'd be fine with a patch on top of all this that removes them. Simon