From: Hannes Domani Date: Tue, 6 Oct 2020 15:20:20 +0000 (+0200) Subject: Remove gdb_assert for TYPE_CODE_METHOD in stabs reader X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1a97fe8cf52a18672ffc2aafa1d209314dd65bde;p=binutils-gdb.git Remove gdb_assert for TYPE_CODE_METHOD in stabs reader It's possible to come across TYPE_CODE_UNDEF at this point in read_member_functions, which according to a comment in read_type is used for forward references. gdb/ChangeLog: 2020-10-22 Hannes Domani * stabsread.c (read_member_functions): Remove gdb_assert. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b493eff0062..282100af214 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2020-10-22 Hannes Domani + + * stabsread.c (read_member_functions): Remove gdb_assert. + 2020-10-22 Hannes Domani * gdbtypes.c (init_complex_type): Check target type name. diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 4b1e3b2857a..9556263a383 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -2331,9 +2331,6 @@ read_member_functions (struct stab_field_info *fip, const char **pp, /* These are methods, not functions. */ if (new_sublist->fn_field.type->code () == TYPE_CODE_FUNC) new_sublist->fn_field.type->set_code (TYPE_CODE_METHOD); - else - gdb_assert (new_sublist->fn_field.type->code () - == TYPE_CODE_METHOD); /* If this is just a stub, then we don't have the real name here. */ if (new_sublist->fn_field.type->is_stub ())