diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2019-05-21 22:14:05 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2019-05-21 23:46:07 +0100 |
commit | dc42e902cc54af2b7e7b54a1171d562f867342d5 (patch) | |
tree | 8548eb6cc33516114da33611af60aa2ee2ee15d3 /bfd/version.h | |
parent | b474a2022dc14fea0dd8ea4cc66b813486132075 (diff) | |
download | gdb-dc42e902cc54af2b7e7b54a1171d562f867342d5.zip gdb-dc42e902cc54af2b7e7b54a1171d562f867342d5.tar.gz gdb-dc42e902cc54af2b7e7b54a1171d562f867342d5.tar.bz2 |
gdb/fortran: Handle gdbarch_floatformat_for_type returning nullptr
In this commit:
commit 34d11c682fd96c7dbe3ebd6cd9033e65d51ec7a3
Date: Fri May 3 15:23:55 2019 +0100
gdb/fortran: Use floatformats_ia64_quad for fortran 16-byte floats
GDB was changed such that the Fortran's 16-byte float format was
obtained by calling gdbarch_floatformat_for_type instead of just using
gdbarch_long_double_format as it was before.
The problem with this default_floatformat_for_type can return NULL in
some cases, and the code introduced in 34d11c682f didn't consider
this.
This commit introduces several alternative strategies for finding a
suitable 16-byte floating point type. First GDB calls
gdbarch_floatformat_for_type (this was what 34d11c682f added), if this
returns null GDB will use gdbarch_long_double_format if it is the
correct size (this was the format used before 34d11c682f). Finally,
if neither of the above provides a suitable type then GDB will create
a new dummy type.
This final dummy type is unlikely to provide an correct debug
experience as far as examining the 16-byte floats, but it should
prevent GDB crashing.
gdb/ChangeLog:
PR gdb/18644:
* f-lang.c (build_fortran_types): Handle the case where
gdbarch_floatformat_for_type returns a nullptr.
Diffstat (limited to 'bfd/version.h')
0 files changed, 0 insertions, 0 deletions