From a4f0544b1ba516db0ab9715e4cccc78bc098ebc9 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 9 Feb 2021 12:15:39 -0700 Subject: Avoid crash in resolve_dynamic_struct resolve_dynamic_struct says: gdb_assert (type->num_fields () > 0); However, a certain Ada program has a structure with no fields but with a dynamic size, causing this assertion to fire. It is difficult to be certain, but we think this is a compiler bug. However, in the meantime this assertion does not seem to be checking any kind of internal consistency; so this patch removes it. gdb/ChangeLog 2021-02-09 Tom Tromey * gdbtypes.c (resolve_dynamic_struct): Handle structure with no fields. --- gdb/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gdb/ChangeLog') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e67668d..6470c99 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2021-02-09 Tom Tromey + + * gdbtypes.c (resolve_dynamic_struct): Handle structure with no + fields. + 2021-02-08 Shahab Vahedi PR tdep/27369 -- cgit v1.1