diff options
author | Tom Tromey <tromey@adacore.com> | 2020-04-06 12:13:24 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2020-04-06 12:29:09 -0600 |
commit | 93689ce91271bf88580a2d035a466479c16f4e71 (patch) | |
tree | 42d0491979b19bb6e65e7b38c0363cd1bf297db2 /gdb/vax-nbsd-tdep.c | |
parent | 797439622361bc901ed64b398c0d689c97cd8121 (diff) | |
download | binutils-93689ce91271bf88580a2d035a466479c16f4e71.zip binutils-93689ce91271bf88580a2d035a466479c16f4e71.tar.gz binutils-93689ce91271bf88580a2d035a466479c16f4e71.tar.bz2 |
Handle complex error type in read_base_type
It turns out there was one more bug in the earlier complex series:
read_base_type could cause an assertion failure on some platforms. I
found this running the AdaCore internal test suite, but you can also
see it by running gdb's "gdb.cp" tests for x86 (not x86-64).
In particular, the DW_ATE_complex_float case calls
dwarf2_init_complex_target_type, which calls dwarf2_init_float_type,
which can return a type using TYPE_CODE_ERROR.
This patch changes the DWARF reader to handle this case, the same way
that the f-lang.c patch did. Perhaps init_complex_type really should
be changed to allow TYPE_CODE_ERROR? I was not sure.
Tested on x86-64 Fedora 30, using an x86 build. I'm checking this in.
gdb/ChangeLog
2020-04-06 Tom Tromey <tromey@adacore.com>
* dwarf2/read.c (read_base_type) <DW_ATE_complex_float>: Handle
TYPE_CODE_ERROR.
Diffstat (limited to 'gdb/vax-nbsd-tdep.c')
0 files changed, 0 insertions, 0 deletions