From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13085 invoked by alias); 18 Oct 2010 21:08:03 -0000 Received: (qmail 13060 invoked by uid 22791); 18 Oct 2010 21:08:02 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 18 Oct 2010 21:07:59 +0000 From: "jakub at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/12134] New: long double precision lost X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 18 Oct 2010 21:08:00 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2010-q4/txt/msg00050.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=12134 Summary: long double precision lost Product: gdb Version: unknown Status: NEW Severity: normal Priority: P2 Component: gdb AssignedTo: unassigned@sourceware.org ReportedBy: jakub@redhat.com Target: x86_64-linux double d = __DBL_DENORM_MIN__; long double l1 = (long double) __DBL_DENORM_MIN__; long double l2 = __LDBL_MIN__; long double l3 = __LDBL_MIN__ * 0x1p200L; int main (void) { return 0; } gcc -g -o tt tt.c gdb ./tt b main r (gdb) p d $1 = 4.9406564584124654e-324 (gdb) p l1 $2 = 4.9406564584124654417656879286822137e-324 (gdb) p l2 $3 = 0 (gdb) p l3 $4 = 0 (gdb) x/2gx &l2 0x600830 : 0x8000000000000000 0x0000000000000001 (gdb) x/2gx &l3 0x600840 : 0x8000000000000000 0x00000000000000c9 >>From the above it seems that the long double value read from the vars is somewhere in gdb internally cast to double, then probably cast back to long double and printed (or goes through text representation or whatever), because l2 and l3 definitely are not zero. Also, it would be nice if p/x {d,l1,l2,l3} printed the double/long double vars using ISO C99 hexadecimal notation (%a/%La for printf) and if hex float literals could be used in gdb expressions. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.