ed6aceddf5
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. |
||
---|---|---|
.. | ||
abbrev.c | ||
abbrev.h | ||
attribute.c | ||
attribute.h | ||
comp-unit.c | ||
comp-unit.h | ||
die.h | ||
dwz.c | ||
dwz.h | ||
expr.c | ||
expr.h | ||
frame-tailcall.c | ||
frame-tailcall.h | ||
frame.c | ||
frame.h | ||
index-cache.c | ||
index-cache.h | ||
index-common.c | ||
index-common.h | ||
index-write.c | ||
index-write.h | ||
leb.c | ||
leb.h | ||
line-header.c | ||
line-header.h | ||
loc.c | ||
loc.h | ||
macro.c | ||
macro.h | ||
read.c | ||
read.h | ||
section.c | ||
section.h | ||
stringify.c | ||
stringify.h |