Add assert in prepare_for_building
authorTom Tromey <tom@tromey.com>
Sun, 20 May 2018 16:25:53 +0000 (10:25 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 16 Jul 2018 14:55:14 +0000 (08:55 -0600)
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.

gdb/ChangeLog
gdb/buildsym.c

index 29df4a009c5cf091940b7de95e41396584023b0f..0a0d00c9646f6a26a31692456ac280c87440454d 100644 (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.
index b548c52e41a164a1b2d494e77a86a599128e699a..035bdb27c05413e66f93b08aed813db1f1556766 100644 (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,
This page took 0.036017 seconds and 4 git commands to generate.