From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 7yS3MwmshGUkBicAWB0awg (envelope-from ) for ; Thu, 21 Dec 2023 16:20:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1703193609; bh=ZWJre+r2ISOLOk3licPtvIyjFpgwLCqXj3c1j5xo0CE=; h=Date:Subject:From:To:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vE5O/duD7fzyiW5UKbcxeGfCesP7m1QbVWmVON3YTQ7ct3WnjKLtZKvdogYHUb6Hu Rx30yCZEnvPaxxB1GQM/fepD8ueoHHfRnqDyahQvhFpAsl04rBivTzM42KUWzSWTMF Pegmte3fPfM9XeYdX7jixqTwoLQ8/YzA7BgyNcTY= Received: by simark.ca (Postfix, from userid 112) id C51D81E0C3; Thu, 21 Dec 2023 16:20:09 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=AyMMLwJ6; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B149F1E0AC for ; Thu, 21 Dec 2023 16:20:07 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2E771384DEEE for ; Thu, 21 Dec 2023 21:20:07 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 0CF823858D37 for ; Thu, 21 Dec 2023 21:19:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0CF823858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0CF823858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703193597; cv=none; b=XXsjYrYoTZ0/+vuNJfeoYUaV+hGWfoM7J/p24XnAg+A+aqVOm3kzVPg5+EWdcTMoSTvWLgVYXIWAPvs9+0ZRhytVmTdAwjgaiNUVQoFWh2EwMMME7pkBGJUl5mfPjE6AWmGli6RLiFLqyU3Jtm1gL2wn7SLOy9PNrjtUnWCD0Tg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703193597; c=relaxed/simple; bh=ZWJre+r2ISOLOk3licPtvIyjFpgwLCqXj3c1j5xo0CE=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To; b=d8IVKXyIi0xMmaxvsFTjoEmwXHOLv+qR5WcuoP0TP4n9uNBKk5rqAmRApS5HIu3wh8sNiTKd5gKAt0j9ECGOEuehdDGWp6AJ/52No5ADYQLvOV4KJCElilsYq/+DrxsJYmhuXhhK00hmLqpautcEKZ3vPdLL5n3Zp6uEKvngdTw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1703193595; bh=ZWJre+r2ISOLOk3licPtvIyjFpgwLCqXj3c1j5xo0CE=; h=Date:Subject:From:To:References:In-Reply-To:From; b=AyMMLwJ6PtuDf2zoFh5xI3Pi2aAu2FtB1pg3rruwbJdnyhCc/py+j4ya9a7yUD1SJ pguF0CdCBr5Jv0ijZYDshA5R1MZhzqnr2z2/PjxEKR5SseSYaJs8yMxpEoPv8VWJ3M tZPmwyZuaG+bdkp9OvgglmAjvHAZxj3YhZ39rqPQ= 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 9ED4E1E0AC; Thu, 21 Dec 2023 16:19:55 -0500 (EST) Message-ID: <53a2c757-1649-40b5-8b77-3215dd25673b@simark.ca> Date: Thu, 21 Dec 2023 16:19:55 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 10/26] gdbserver: convert registers_to_string into regcache::registers_to_string Content-Language: fr From: Simon Marchi To: Tankut Baris Aktemur , gdb-patches@sourceware.org References: <5ff95fd684084ed53879f1c2c5f96be1a9d4a59a.1677582744.git.tankut.baris.aktemur@intel.com> <389952e7-4479-4bca-9c32-1b7d8e600583@simark.ca> In-Reply-To: <389952e7-4479-4bca-9c32-1b7d8e600583@simark.ca> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org On 12/21/23 16:13, Simon Marchi wrote: > On 2/28/23 06:28, Tankut Baris Aktemur via Gdb-patches wrote: >> Convert the free `registers_to_string` function into a method of >> the regcache struct. > > I'm not strongly opposed to this change, but I think that it works just > as well as a free function. Not everything working on a regcache needs > to be a method of regcache. If you imagine that all the members of > regcache are private, and it offers an interface to access the register > contents and statuses, then registers_to_string can very well be > implemented using that public interface. To clarify, I think that this functionality might belong more in the remote-utils.cc's area of responsibility, since it's serializing the regcache's content specifically for the remote protocol. Simon