Add assert in prepare_for_building

This adds an assertion in prepare_for_building.  This was useful for
verifying whether some subsequent changes were valid.

gdb/ChangeLog
2018-07-16  Tom Tromey  <tom@tromey.com>

	* buildsym.c (prepare_for_building): Add assert.
This commit is contained in:
Tom Tromey 2018-05-20 10:25:53 -06:00
parent 905eb0e293
commit e62cca7ccb
2 changed files with 5 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2018-07-16 Tom Tromey <tom@tromey.com>
* buildsym.c (prepare_for_building): Add assert.
2018-07-16 Tom Tromey <tom@tromey.com>
* buildsym.c (~buildsym_compunit): Update.

View File

@ -1021,6 +1021,7 @@ prepare_for_building (const char *name, CORE_ADDR start_addr)
gdb_assert (pending_macros == NULL);
gdb_assert (pending_addrmap == NULL);
gdb_assert (current_subfile == NULL);
gdb_assert (buildsym_compunit == nullptr);
}
/* Start a new symtab for a new source file in OBJFILE. Called, for example,