aboutsummaryrefslogtreecommitdiff
path: root/gnulib
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2020-04-29 11:16:57 -0600
committerTom Tromey <tromey@adacore.com>2020-04-29 11:16:57 -0600
commited6aceddf5b2c31cda8f74982e8dd0574b3979b8 (patch)
tree8b550d0c1b9131604fc5149406b5d973f01ec30f /gnulib
parentb68b1b58d687584f7177678146e4c7def22e9699 (diff)
downloadgdb-ed6aceddf5b2c31cda8f74982e8dd0574b3979b8.zip
gdb-ed6aceddf5b2c31cda8f74982e8dd0574b3979b8.tar.gz
gdb-ed6aceddf5b2c31cda8f74982e8dd0574b3979b8.tar.bz2
Fix Ada crash with .debug_types
PR ada/25875 concerns a gdb crash when gdb.ada/arr_enum_idx_w_gap.exp is run using the .debug_types board. The problem turns out to be caused by weird compiler output. In this test, the compiler emits a top-level type that refers to an enumeration type which is nested in a function. However, this function is just a declaration. This results in gdb calling read_enumeration_type for the enum type, but process_enumeration_scope is never called, yielding an enum with no fields. This causes the crash. This patch fixes the problem by arranging to create the enum fields in read_enumeration_type. Tested on x86-64 Fedora 30. gdb/ChangeLog 2020-04-29 Tom Tromey <tromey@adacore.com> PR ada/25875: * dwarf2/read.c (update_enumeration_type_from_children): Compute type fields here. (read_enumeration_type): Call update_enumeration_type_from_children later. Update comments. (process_enumeration_scope): Don't create type fields.
Diffstat (limited to 'gnulib')
0 files changed, 0 insertions, 0 deletions