From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id HtfhNHSatF+/FwAAWB0awg (envelope-from ) for ; Tue, 17 Nov 2020 22:52:20 -0500 Received: by simark.ca (Postfix, from userid 112) id CBED41F08B; Tue, 17 Nov 2020 22:52:20 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI,RDNS_NONE autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [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 7EAF31E58E for ; Tue, 17 Nov 2020 22:52:20 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 084AF3857011; Wed, 18 Nov 2020 03:52:20 +0000 (GMT) Received: from rock.gnat.com (rock.gnat.com [IPv6:2620:20:4000:0:a9e:1ff:fe9b:1d1]) by sourceware.org (Postfix) with ESMTP id A8DC43858023 for ; Wed, 18 Nov 2020 03:52:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A8DC43858023 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 5AE1411628F; Tue, 17 Nov 2020 22:52:18 -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 pILQysrjOH7D; Tue, 17 Nov 2020 22:52:18 -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 E18B41161CF; Tue, 17 Nov 2020 22:52:16 -0500 (EST) Received: by float.home (Postfix, from userid 1000) id 21BC5A1871; Wed, 18 Nov 2020 07:52:12 +0400 (+04) Date: Wed, 18 Nov 2020 07:52:12 +0400 From: Joel Brobecker To: Luis Machado Subject: Re: [PATCH 3/9] gmp-utils: New API to simply use of GMP's integer/rational/float objects Message-ID: <20201118035212.GG617116@adacore.com> References: <1604817017-25807-1-git-send-email-brobecker@adacore.com> <1604817017-25807-4-git-send-email-brobecker@adacore.com> <5dd2adfd-84bb-256f-3c88-b759c138a649@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5dd2adfd-84bb-256f-3c88-b759c138a649@linaro.org> 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" Hi Luis, > Just a quick comment... shouldn't gmp-utils.c go into gdbsupport so > gdbserver can use it as well? I think you would need to make GDBserver require GMP support first. I don't see where GDBserver would benefit from GMP, but if it does, I don't believe it would be a problem to move it to gdbsupport. > On 11/8/20 3:30 AM, Joel Brobecker wrote: > > This API was motivated by a number of reasons: > > - GMP's API does not handle "long long" and "unsigned long long", > > so using LONGEST and ULONGEST is not straightforward; > > - Automate the need to initialize GMP objects before use, and > > clear them when no longer used. > > > > However, this API grew also to help with similar matter such > > as formatting to a string, and also reading/writing fixed-point > > values from byte buffers. > > > > Dedicated unit testing is also added. > > > > gdb/ChangeLog: > > > > * gmp-utils.h, gmp-utils.h: New file. > > Typo in the filename. Thanks for catching this, I will fix. -- Joel