Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH][PR 18702] Fix wrong output of x87 registers due to truncation to double on amd64
@ 2015-11-20 22:07 Ruslan Kabatsayev
  2015-12-02 11:32 ` Yao Qi
  2015-12-03 12:28 ` Pedro Alves
  0 siblings, 2 replies; 14+ messages in thread
From: Ruslan Kabatsayev @ 2015-11-20 22:07 UTC (permalink / raw)
  To: gdb-patches

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.

gdb/ChangeLog:

	* configure.host: Fix detection of x86_64 host when setting floatformats

---
 gdb/configure.host |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/configure.host b/gdb/configure.host
index 48714f4..ef265eb 100644
--- a/gdb/configure.host
+++ b/gdb/configure.host
@@ -195,7 +195,7 @@ esac
 # "double" and "long double" types.
 
 case "${host}" in
-i[34567]86-*-*)
+i[34567]86-*-*|x86_64-*-*)
 	gdb_host_float_format="&floatformat_ieee_single_little"
 	gdb_host_double_format="&floatformat_ieee_double_little"
 	gdb_host_long_double_format="&floatformat_i387_ext"
-- 
1.7.10.2


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-12-09 12:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-20 22:07 [PATCH][PR 18702] Fix wrong output of x87 registers due to truncation to double on amd64 Ruslan Kabatsayev
2015-12-02 11:32 ` Yao Qi
2015-12-02 14:26   ` Ruslan Kabatsayev
2015-12-03 11:27     ` Yao Qi
2015-12-04 14:41       ` Ruslan Kabatsayev
2015-12-03 12:28 ` Pedro Alves
2015-12-04 15:06   ` Ruslan Kabatsayev
2015-12-04 15:11     ` Pedro Alves
2015-12-04 15:17       ` Ruslan Kabatsayev
2015-12-04 15:35         ` Pedro Alves
2015-12-04 16:09           ` Ruslan Kabatsayev
2015-12-05 22:41             ` Andrew Burgess
2015-12-06  6:30               ` Ruslan Kabatsayev
2015-12-09 12:23                 ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox