From: Alok Kumar Sharma Date: Thu, 3 Sep 2020 16:21:01 +0000 (+0530) Subject: Support printing of 16 byte real/complex type for Flang compiler X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e56798df08154c6e5155d3bb6cb536a14de0ebb4;p=binutils-gdb.git 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ca251b27b42..faa3a612547 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-09-03 Alok Kumar Sharma + + * 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 PR breakpoint/26546 diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index d9fa2b92649..b3aa115c187 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -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);