Support printing of 16 byte real/complex type for Flang compiler

Currently GDB is not able to print correct value for real/complex type
from binary generated from Flang compiler. This is due to GDB not able
to recognise and determine correct format floatformats_ia64_quad and
instead falling back to default_floatformat_for_type. This leads
incorrect output.
Now function i386_floatformat_for_type is fixed to correctly identify
Flang generated 16 byte real/complex type.

gdb/ChangeLog

	* gdb/i386-tdep.c (i386_floatformat_for_type): Added conditions
	to match 16 byte real/complex type generated by Flang compiler.
This commit is contained in:
Alok Kumar Sharma 2020-09-03 21:51:01 +05:30
parent 0316fb52d6
commit e56798df08
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2020-09-03 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
* gdb/i386-tdep.c (i386_floatformat_for_type): Added conditions
to match 16 byte real/complex type generated by Flang compiler.
2020-09-03 Tom de Vries <tdevries@suse.de>
PR breakpoint/26546

View File

@ -8211,7 +8211,9 @@ i386_floatformat_for_type (struct gdbarch *gdbarch,
|| strcmp (name, "_Float128") == 0
|| strcmp (name, "complex _Float128") == 0
|| strcmp (name, "complex(kind=16)") == 0
|| strcmp (name, "real(kind=16)") == 0)
|| strcmp (name, "quad complex") == 0
|| strcmp (name, "real(kind=16)") == 0
|| strcmp (name, "real*16") == 0)
return floatformats_ia64_quad;
return default_floatformat_for_type (gdbarch, name, len);