gdb/fortran: Fix quad floating-point type for Intel compilers.
authorFelix Willgerodt <felix.willgerodt@intel.com>
Mon, 15 Mar 2021 10:00:28 +0000 (11:00 +0100)
committerFelix Willgerodt <felix.willgerodt@intel.com>
Mon, 15 Mar 2021 10:02:31 +0000 (11:02 +0100)
Intel Fortran compilers emit the following DWARF for gdb.fortran/complex.f90:

0x00000071:   DW_TAG_base_type
                DW_AT_name ("COMPLEX*32")
                DW_AT_encoding (DW_ATE_complex_float)
                DW_AT_byte_size (0x20)

0x00000078:   DW_TAG_base_type
                DW_AT_name ("REAL*16")
                DW_AT_encoding (DW_ATE_float)
                DW_AT_byte_size (0x10)

This results in GDB not reading the right values, as it wrongly assumes the
default floatformat "floatformat_i387_ext" instead of
"floatformat_ia64_quad_little".

gdb/ChangeLog:
2021-03-15  Felix Willgerodt  <felix.willgerodt@intel.com>

* i386-tdep.c (i386_floatformat_for_type): Add COMPLEX*32 and REAL*16.

gdb/ChangeLog
gdb/i386-tdep.c

index 59c8a3993275bc68eb71c795d6719b6d2300096f..36f862a2c919bab70e1b299c0cf1f81c0a4caafb 100644 (file)
@@ -1,3 +1,7 @@
+2021-03-15  Felix Willgerodt  <felix.willgerodt@intel.com>
+
+       * i386-tdep.c (i386_floatformat_for_type): Add COMPLEX*32 and REAL*16.
+
 2021-03-15  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * python/python.c (gdbpy_source_objfile_script): Use
index 4f8da924073a09535ba8c25be32a2072361744bc..2649fad08f201404a582ff49db57d9e5d209a581 100644 (file)
@@ -8162,9 +8162,12 @@ i386_floatformat_for_type (struct gdbarch *gdbarch,
        || strcmp (name, "_Float128") == 0
        || strcmp (name, "complex _Float128") == 0
        || strcmp (name, "complex(kind=16)") == 0
+       || strcmp (name, "complex*32") == 0
+       || strcmp (name, "COMPLEX*32") == 0
        || strcmp (name, "quad complex") == 0
        || strcmp (name, "real(kind=16)") == 0
-       || strcmp (name, "real*16") == 0)
+       || strcmp (name, "real*16") == 0
+       || strcmp (name, "REAL*16") == 0)
       return floatformats_ia64_quad;
 
   return default_floatformat_for_type (gdbarch, name, len);