Remove gdb_assert for TYPE_CODE_METHOD in stabs reader
authorHannes Domani <ssbssa@yahoo.de>
Tue, 6 Oct 2020 15:20:20 +0000 (17:20 +0200)
committerHannes Domani <ssbssa@yahoo.de>
Thu, 22 Oct 2020 17:33:40 +0000 (19:33 +0200)
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.

gdb/ChangeLog
gdb/stabsread.c

index b493eff0062e73d45206b347d7fa6240c4747d22..282100af214cb6c85168be7acd566cdbf06f1213 100644 (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.
index 4b1e3b2857aa8b02d3715c35b589bcc9d5865aaf..9556263a38304bee6be68f6985731f0b02ef328a 100644 (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 ())