]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/symtab] Assert that per-cu symtab expansion state is defined
authorTom de Vries <tdevries@suse.de>
Thu, 24 Jun 2021 15:58:53 +0000 (17:58 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 24 Jun 2021 15:58:53 +0000 (17:58 +0200)
gdb/psymtab.c

index 3e0f7e721b76ad8683ec085c6be4f79b94ade00a..6e55d0fdb8f5f8dd7ef82838563c69a7a2e119c3 100644 (file)
@@ -588,6 +588,8 @@ psymtab_to_symtab (struct objfile *objfile, struct partial_symtab *pst)
   while (pst->user != NULL)
     pst = pst->user;
 
+  gdb_assert (pst->expansion_state != partial_symtab::unexpanded);
+
   /* If it's been looked up before, return it.  */
   if (pst->get_compunit_symtab (objfile))
     return pst->get_compunit_symtab (objfile);