summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Willgerodt <felix.willgerodt@intel.com>2021-03-15 11:00:28 +0100
committerFelix Willgerodt <felix.willgerodt@intel.com>2021-03-15 11:02:31 +0100
commit8d624a9d8050ca96e154215c7858ac5c2d8b0b19 (patch)
tree81c914f814e862b799c32c2acb89a138bff51fc5
parentc68b1842bdb3cedce0cac7da43045c3788085a91 (diff)
downloadbinutils-gdb-8d624a9d8050ca96e154215c7858ac5c2d8b0b19.tar.gz
gdb/fortran: Fix quad floating-point type for Intel compilers.
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.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/i386-tdep.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 59c8a399327..36f862a2c91 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 4f8da924073..2649fad08f2 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -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);