From: Tom Tromey Date: Sun, 20 May 2018 16:25:53 +0000 (-0600) Subject: Add assert in prepare_for_building X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e62cca7ccb9ea47d18a0812a2c27f00e5048367b;p=binutils-gdb.git 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 * buildsym.c (prepare_for_building): Add assert. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 29df4a009c5..0a0d00c9646 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2018-07-16 Tom Tromey + + * buildsym.c (prepare_for_building): Add assert. + 2018-07-16 Tom Tromey * buildsym.c (~buildsym_compunit): Update. diff --git a/gdb/buildsym.c b/gdb/buildsym.c index b548c52e41a..035bdb27c05 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -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,