From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) by sourceware.org (Postfix) with ESMTPS id EDADC3854827 for ; Mon, 16 Nov 2020 16:34:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org EDADC3854827 Received: by mail-qk1-x736.google.com with SMTP id l2so17357866qkf.0 for ; Mon, 16 Nov 2020 08:34:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ALZTxyrwIdCc7PkId2xqdHnyt02RvUjl7+ZPmE1v0eA=; b=UJITwKaGxSxw5YB/D8zfJPwAVGMJ9IEtZuDLWLMRfkDdytSI5/3Lq6S68oSsCtrzH2 2NYMDjssvAsS4I4fO6UVw3nzyuwRIR9eQy3R9/KG6uQNRCGOGGRoea01+wWiQJR9saXQ gEzRWY3fPQVWF+h2v4y8jpeQ2SNfZabHxr6jSGgqPn4Rf7c2VqjFAF5vpg15XB9hNk+q KgOX46tJAkkdAZXX50N7fioUSzKYA8MaFMRF9fYzVLJPLRz7g/3B00XecpmuvsYtZErh c4RIBiibaaMwl4Vtxli5JLMZiWZ1M99sF96PrNVrFOX46CpqcMYI5LK5lW5CjUdgfbDA LJkw== X-Gm-Message-State: AOAM533Klx+ByFpZn/vKcFzWBKR9Fyw5yOb5tMVBF0ytk20xzwLwp8dy XluPUM83kHhhzr7DoKLh9IYcId1UrdMTbg== X-Google-Smtp-Source: ABdhPJz42JCSlEzrVTejSVM4nx10Zsd7bCBfunSpdWBUPbEfz6+EW8p5tjyMsk3jWDP5dK3whyi/CA== X-Received: by 2002:ae9:e007:: with SMTP id m7mr14898907qkk.416.1605544481265; Mon, 16 Nov 2020 08:34:41 -0800 (PST) Received: from ?IPv6:2804:7f0:8284:1487:34cb:6ef2:6b7f:4db2? ([2804:7f0:8284:1487:34cb:6ef2:6b7f:4db2]) by smtp.gmail.com with ESMTPSA id z6sm11600966qti.88.2020.11.16.08.34.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Nov 2020 08:34:40 -0800 (PST) Subject: Re: [PATCH 3/9] gmp-utils: New API to simply use of GMP's integer/rational/float objects To: Joel Brobecker , gdb-patches@sourceware.org References: <1604817017-25807-1-git-send-email-brobecker@adacore.com> <1604817017-25807-4-git-send-email-brobecker@adacore.com> From: Luis Machado Message-ID: <5dd2adfd-84bb-256f-3c88-b759c138a649@linaro.org> Date: Mon, 16 Nov 2020 13:34:38 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <1604817017-25807-4-git-send-email-brobecker@adacore.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.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: , X-List-Received-Date: Mon, 16 Nov 2020 16:34:43 -0000 Just a quick comment... shouldn't gmp-utils.c go into gdbsupport so gdbserver can use it as well? 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.