From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 4B19B3858C52 for ; Mon, 31 Jul 2023 21:41:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4B19B3858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 0F56B22044; Mon, 31 Jul 2023 21:41:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1690839680; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e43XJKJQGUuIApch0NBJQPXDXXr5GsE3O/ksUd2997o=; b=NghVUdzBx9maXzcn68/uc14PxNtpa0ccfzOvfigzbnvUDXHJmct0rHSeS45Lh0wyMevMSW H2M8hziHoKgrn+1FftzzDEzbE+tZkBGnc5+hZft1L+ti2VSW+e0VcOmLa36EGj2uZGga7z qRlY1uYovRKG0c92239Ap/fxFhuClhY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1690839680; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e43XJKJQGUuIApch0NBJQPXDXXr5GsE3O/ksUd2997o=; b=zkRPFvXhY/846m8f7eZWhOKdriev75BGTIyKaq5hvoXEcdy6sin/R1wfCuO0aFfFcsg7zF KB0A9CS19r4WNUBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id EEE7B133F7; Mon, 31 Jul 2023 21:41:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id icUUOX8qyGRSFwAAMHmgww (envelope-from ); Mon, 31 Jul 2023 21:41:19 +0000 Message-ID: <1f4e795f-32c2-321d-d7f9-62a51437f513@suse.de> Date: Mon, 31 Jul 2023 23:41:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] Fix bug in fixed-point handling Content-Language: en-US To: Tom Tromey , Tom Tromey via Gdb-patches References: <20230719152442.67508-1-tromey@adacore.com> <87zg3cf33d.fsf@tromey.com> From: Tom de Vries In-Reply-To: <87zg3cf33d.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 7/31/23 18:38, Tom Tromey via Gdb-patches wrote: >>>>>> "Tom" == Tom Tromey via Gdb-patches writes: > > Tom> Alexandre Oliva found a bug in gdb's handling of fixed-point -- a > Tom> certain Ada fixed-point type would be misintepreted. The bug was that > Tom> the DW_AT_small looked like: > > Tom> <1><13cd>: Abbrev Number: 16 (DW_TAG_constant) > Tom> <13ce> DW_AT_GNU_numerator: 1 > Tom> <13cf> DW_AT_GNU_denominator: 0x8000000000000000 > > Tom> ... but gdb interpreted the denominator as a negative value. > > I'm checking this in. Test-case fails with gcc-9 and earlier: ... (gdb) PASS: gdb.ada/fixed_points.exp: scenario=all: print fp4_var / 1 p Float(Another_Fixed) = Float(Another_Delta * 5)^M No definition of "another_delta" in current context.^M (gdb) FAIL: gdb.ada/fixed_points.exp: scenario=all: value of another_fixed ... Thanks, - Tom