From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id HVkMNWS+fGe4zQUAWB0awg (envelope-from ) for ; Tue, 07 Jan 2025 00:40:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1736228452; bh=5r6SBDFQhcgy2RzeJW8tqjiIyZ+WIWL9yQSQRAAFSEo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=BVJnKD8yFKP9/nCLxpA1snBWFY5AndmlloZi7gYi9yCD+2474DDv9lMwJo4VpENSj Ft6ghZh/AeGLXmKirbeMLfgZTkAdpGmvGvbBokmXGYhyKzBCQXBRaayUD53B+z7Mqz XUHDxFGbvKVvJOtkeIoQ8KuVOy0PBEISRd0Mmn4s= Received: by simark.ca (Postfix, from userid 112) id CB59D1E0C0; Tue, 7 Jan 2025 00:40:52 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable autolearn_force=no version=4.0.0 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=gsVWFajK; dkim=pass (1024-bit key) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=gsVWFajK; 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 489CE1E091 for ; Tue, 7 Jan 2025 00:40:52 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D664E3858427 for ; Tue, 7 Jan 2025 05:40:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D664E3858427 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=gsVWFajK; dkim=pass (1024-bit key) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=gsVWFajK Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 2B61E3858CD1 for ; Tue, 7 Jan 2025 05:40:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2B61E3858CD1 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 2B61E3858CD1 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=1736228412; cv=none; b=irMmCyL28onZlesrRtwoHvPs97+xcdT9H+zXawNRc4hyuet3QXuWCB3fTLr6mDMK9Bl1ikI1ZPNtKZDY1s9TqDNQvKlHR/MmXcsNoOyQeb+20pAW2EEyli1GcOR2Yp03vQIYsNK9JpFVXmKynHjZmYzt5VM8k1GEDxRN3JBS8F0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736228412; c=relaxed/simple; bh=5r6SBDFQhcgy2RzeJW8tqjiIyZ+WIWL9yQSQRAAFSEo=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version: Subject:To:From; b=iPcR9MZWJVn1Za/8rxcBPS2KwbSocDaPTzEMDCvN0HvR2LJGKemC0TD0jfXu0IUu5yuhY4T1v+/Uu7L25pHcqwNOCHBJ9gSJYwdTPZ2RdnYUC+mvH6o9kD3YDCfYOFZSxFW4MBFkUQ8EcFXWTJ0Ogz+tZLzu+T65uT2Czn06llM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2B61E3858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1736228411; bh=5r6SBDFQhcgy2RzeJW8tqjiIyZ+WIWL9yQSQRAAFSEo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=gsVWFajKFMcQjJ53weJi2dvgomRP0uCkRvuoGj2/nVqIa0WPgX/7pIsGRa1fojAFb dud0xgiqjjWQsaH7ke8xKvWCW3xiv4aYY23ZQ6mkCL2NJjv+lHMKIbWYMQV+cY95mQ p3LnLE/2P305uAhK6ILcsfjpQ1jkiVyTAwcmOdXM= Received: by simark.ca (Postfix, from userid 112) id DA9D21E0C1; Tue, 7 Jan 2025 00:40:11 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1736228411; bh=5r6SBDFQhcgy2RzeJW8tqjiIyZ+WIWL9yQSQRAAFSEo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=gsVWFajKFMcQjJ53weJi2dvgomRP0uCkRvuoGj2/nVqIa0WPgX/7pIsGRa1fojAFb dud0xgiqjjWQsaH7ke8xKvWCW3xiv4aYY23ZQ6mkCL2NJjv+lHMKIbWYMQV+cY95mQ p3LnLE/2P305uAhK6ILcsfjpQ1jkiVyTAwcmOdXM= Received: from [10.0.0.11] (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (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 2D2681E091; Tue, 7 Jan 2025 00:40:11 -0500 (EST) Message-ID: <180ea337-8fe1-456e-ac6f-852cb2e5669f@simark.ca> Date: Tue, 7 Jan 2025 00:40:10 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 11/11] gdbserver: fix the declared type of register_status in regcache To: Tankut Baris Aktemur , gdb-patches@sourceware.org Cc: simon.marchi@efficios.com References: <20241230-upstream-gdbserver-regcache-v2-0-020a9514fcf0@intel.com> <20241230-upstream-gdbserver-regcache-v2-11-020a9514fcf0@intel.com> Content-Language: en-US From: Simon Marchi In-Reply-To: <20241230-upstream-gdbserver-regcache-v2-11-020a9514fcf0@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 2024-12-30 05:49, Tankut Baris Aktemur wrote: > The register_status field of regcache is declared as `unsigned char *`. > This is incorrect, because `enum register_status` from > gdbsupport/common-regcache.h is based on signed char and > REG_UNAVAILABLE is defined as -1. Fix the declared type. > > Now that we are modifying the declaration, also use a unique_ptr > and make the field private. > > The get/set methods already use the correct type, but we update cast > operations in two places. Oh well, you can disregard my previous comments about changing the type of this field and making it private :). I should really find a way to review an entire series before sending the feedback... Approved-By: Simon Marchi Simon