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: Pedro Alves <palves at redhat dot com>
- To: Ruslan Kabatsayev <b7 dot 10110111 at gmail dot com>, gdb-patches at sourceware dot org
- Date: Thu, 03 Dec 2015 12:28:47 +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>
On 11/20/2015 10:07 PM, Ruslan Kabatsayev wrote:
> 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.
A test to make sure we don't regress this would be nice.
Maybe add something to gdb.arch/i386-float.exp ?
Thanks,
Pedro Alves