From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id fOZbG1V3ul8wKwAAWB0awg (envelope-from ) for ; Sun, 22 Nov 2020 09:36:05 -0500 Received: by simark.ca (Postfix, from userid 112) id 630D61F0AB; Sun, 22 Nov 2020 09:36:05 -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=ham 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 CC3A51F0A9 for ; Sun, 22 Nov 2020 09:36:04 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 30DE63858011; Sun, 22 Nov 2020 14:36:04 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 0DE103858009 for ; Sun, 22 Nov 2020 14:36:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0DE103858009 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [10.0.0.11] (173-246-6-90.qc.cable.ebox.net [173.246.6.90]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 2D1941F0A9; Sun, 22 Nov 2020 09:36:00 -0500 (EST) Subject: Re: [RFA] Add TYPE_CODE_FIXED_POINT handling in print_type_scalar To: Joel Brobecker , gdb-patches@sourceware.org References: <20201118034727.GF617116@adacore.com> <1606050776-62740-1-git-send-email-brobecker@adacore.com> From: Simon Marchi Message-ID: <35a95886-01ac-4c1b-7a47-f4e02d98215d@simark.ca> Date: Sun, 22 Nov 2020 09:35:59 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <1606050776-62740-1-git-send-email-brobecker@adacore.com> Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 7bit 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: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 2020-11-22 8:12 a.m., Joel Brobecker wrote: > Hello, > > This commit enhances print_type_scalar to include support for > TYPE_CODE_FIXED_POINT. This way, any language falling back to > this function for printing the description of some types > also gets basic ptype support for fixed point types as well. > > This fixes a couple of XFAILs in gdb.dwarf2/dw2-fixed-point.exp. > > gdb/ChangeLog: > > * typeprint.c (print_type_scalar): Add handling of > TYPE_CODE_FIXED_POINT. > > gdb/testsuite/ChangeLog: > > * gdb.dwarf2/dw2-fixed-point.exp: Fix the expected output of > the "ptype pck__fp1_range_var" test for the module-2 and pascal > languages. Remove the associated setup_xfail. > > The ptype output for range types in modula-2 and pascal is a little > odd (the type info is repeated twice around the ".." operator), but > I guess that's how they present range types in those languages. Yeah, it seems like it. Thanks for doing this, the change to handle fixed point in the generic print_type_scalar function looks good to me. Simon