[RFA 03/42] Add assert in prepare_for_building
Tom Tromey
tom@tromey.com
Wed May 23 04:59:00 GMT 2018
This adds an assertion in prepare_for_building. This was useful for
verifying whether some subsequent changes were valid.
gdb/ChangeLog
2018-05-22 Tom Tromey <tom@tromey.com>
* buildsym.c (prepare_for_building): Add assert.
---
gdb/ChangeLog | 4 ++++
gdb/buildsym.c | 1 +
2 files changed, 5 insertions(+)
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index b747a082b5..9e0c39a4a4 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -1025,6 +1025,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,
--
2.13.6
More information about the Gdb-patches
mailing list