From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id IHqZCEI/y19XTwAAWB0awg (envelope-from ) for ; Sat, 05 Dec 2020 03:05:22 -0500 Received: by simark.ca (Postfix, from userid 112) id 215D71F0B8; Sat, 5 Dec 2020 03:05:22 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.2 Received: from 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C897D1E58E for ; Sat, 5 Dec 2020 03:05:21 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 116EB385782B; Sat, 5 Dec 2020 08:05:21 +0000 (GMT) Received: from rock.gnat.com (rock.gnat.com [205.232.38.15]) by sourceware.org (Postfix) with ESMTP id 3AC68385782B for ; Sat, 5 Dec 2020 08:05:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3AC68385782B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=brobecker@adacore.com Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 0E9A5561AF; Sat, 5 Dec 2020 03:05:17 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 7WfHXLw7Y1PV; Sat, 5 Dec 2020 03:05:16 -0500 (EST) Received: from float.home (localhost.localdomain [127.0.0.1]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPS id B0785561AE; Sat, 5 Dec 2020 03:05:16 -0500 (EST) Received: by float.home (Postfix, from userid 1000) id 551E4A1880; Sat, 5 Dec 2020 12:05:11 +0400 (+04) Date: Sat, 5 Dec 2020 12:05:11 +0400 From: Joel Brobecker To: Simon Marchi Subject: Re: [RFA 1/2] Fix TARGET_CHAR_BIT/HOST_CHAR_BIT confusion in gmp-utils.c Message-ID: <20201205080511.GA230971@adacore.com> References: <20201123042711.GA967337@adacore.com> <1606664757-144138-1-git-send-email-brobecker@adacore.com> <1606664757-144138-2-git-send-email-brobecker@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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" > > In a couple of gdb_mpz methods, we are computing the number of > > bits in a gdb::array_view of gdb_byte. Since gdb_byte is defined > > using a host-side type (see common-types.h), the number of bits > > in a gdb_byte should be HOST_CHAR_BIT, not TARGET_CHAR_BIT. > > Right, and we are not supposed to use TARGET_CHAR_BIT anymore. The same > GDB could be debugging targets with different target char bit values, so > a build-time constant like TARGET_CHAR_BIT can't work. For those cases, > gdbarch_addressable_memory_unit_size should be used instead. Thanks for the review and the explanation, Simon. I just pushed this patch to master. -- Joel