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  <ssbssa@yahoo.de>

	* stabsread.c (read_member_functions): Remove gdb_assert.
This commit is contained in:
Hannes Domani 2020-10-06 17:20:20 +02:00
parent 6b9d0dfda4
commit 1a97fe8cf5
2 changed files with 4 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2020-10-22 Hannes Domani <ssbssa@yahoo.de>
* stabsread.c (read_member_functions): Remove gdb_assert.
2020-10-22 Hannes Domani <ssbssa@yahoo.de>
* gdbtypes.c (init_complex_type): Check target type name.

View File

@ -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 ())