This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH][PR 18702] Fix wrong output of x87 registers due to truncation to double on amd64
- From: Andrew Burgess <andrew dot burgess at embecosm dot com>
- To: Ruslan Kabatsayev <b7 dot 10110111 at gmail dot com>
- Cc: Pedro Alves <palves at redhat dot com>, gdb-patches at sourceware dot org
- Date: Sat, 5 Dec 2015 22:41:29 +0000
- Subject: Re: [PATCH][PR 18702] Fix wrong output of x87 registers due to truncation to double on amd64
- Authentication-results: sourceware.org; auth=none
- References: <564F998D dot 5080406 at gmail dot com> <5660357F dot 4030605 at redhat dot com> <CAHEcG94t8ks6M_e=G98wXvCcNjzcgLCGtAOmqKm3-TYOg8GHww at mail dot gmail dot com> <5661AD07 dot 5090002 at redhat dot com> <CAHEcG96YEnYnBevsNcz71553u9LsWU5tZFxpRzNcLz0eDNXrow at mail dot gmail dot com> <5661B2A7 dot 6020005 at redhat dot com> <5661BACA dot 50909 at gmail dot com>
* Ruslan Kabatsayev <b7.10110111@gmail.com> [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.
Thanks,
Andrew