From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103612 invoked by alias); 6 Dec 2015 06:30:36 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 103391 invoked by uid 89); 6 Dec 2015 06:30:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-lf0-f45.google.com Received: from mail-lf0-f45.google.com (HELO mail-lf0-f45.google.com) (209.85.215.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sun, 06 Dec 2015 06:30:05 +0000 Received: by lfs39 with SMTP id 39so131492411lfs.3 for ; Sat, 05 Dec 2015 22:30:01 -0800 (PST) X-Received: by 10.25.88.67 with SMTP id m64mr11573616lfb.23.1449383401774; Sat, 05 Dec 2015 22:30:01 -0800 (PST) Received: from [192.168.0.204] ([91.215.122.25]) by smtp.gmail.com with ESMTPSA id o67sm3760764lfo.33.2015.12.05.22.30.00 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 05 Dec 2015 22:30:01 -0800 (PST) Subject: Re: [PATCH][PR 18702] Fix wrong output of x87 registers due to truncation to double on amd64 To: Andrew Burgess References: <564F998D.5080406@gmail.com> <5660357F.4030605@redhat.com> <5661AD07.5090002@redhat.com> <5661B2A7.6020005@redhat.com> <5661BACA.50909@gmail.com> <20151205224129.GO4625@embecosm.com> Cc: Pedro Alves , gdb-patches@sourceware.org From: Ruslan Kabatsayev Message-ID: <5663D5E7.5010409@gmail.com> Date: Sun, 06 Dec 2015 06:30:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20151205224129.GO4625@embecosm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-12/txt/msg00109.txt.bz2 On 12/06/2015 01:41 AM, Andrew Burgess wrote: > * Ruslan Kabatsayev [2015-12-04 19:09:46 +0300]: > >> When `info float` is used on an AMD64 system, GDB prints floating-point >> values of x87 registers with raw contents like 0x361a867a8e0527397ce0 or >> 0xc4f988454a1ddd3cfdab wrongly. This happens due to truncation to double, >> after which the former becomes 0.0, and the latter becomes negative infinity. >> This is caused by failed detection of x86-64 host, which results in setting >> gdb_host_{float,double,long_double}_format to zeros. >> This commit fixes this misdetection, and adds a test to make sure future >> commits don't introduce a regression here. >> >> gdb/ChangeLog: >> >> * configure.host: Fix detection of x86_64 host when setting >> floatformats. >> * testsuite/gdb.arch/i386-float.S: Add a regression test for the fix. >> * testsuite/gdb.arch/i386-float.exp: Add checking of the test results. > > There's a separate ChangeLog in the gdb/testsuite directory, so you > need to split your entry over these two files. And remember files > names in the testsuite ChangeLog don't need to have the testsuite/ > prefix. gdb/ChangeLog: * configure.host: Fix detection of x86_64 host when setting floatformats. gdb/testsuite/ChangeLog: * gdb.arch/i386-float.S: Add a regression test for the fix of floatformats setup on x86_64 hosts. * gdb.arch/i386-float.exp: Add checking of the test results for floatformats setup on x86_64 hosts. > > Thanks, > Andrew > >