aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2013-05-09 17:24:55 +0000
committerDoug Evans <dje@google.com>2013-05-09 17:24:55 +0000
commit2cb9c8590a0a0b80cfaa305fbcde2cb9efcf6e48 (patch)
tree1637b456f9b23d25d8de5d6ae6f0837a2a2ee466 /gdb
parentceae87f3fed88525f5f4ade1173ecb5368366edf (diff)
downloadgdb-2cb9c8590a0a0b80cfaa305fbcde2cb9efcf6e48.zip
gdb-2cb9c8590a0a0b80cfaa305fbcde2cb9efcf6e48.tar.gz
gdb-2cb9c8590a0a0b80cfaa305fbcde2cb9efcf6e48.tar.bz2
* symfile.c (decrement_reading_symtab): Add assert.
(increment_reading_symtab): Ditto.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/symfile.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2d1e3e1..f997abf 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2013-05-09 Doug Evans <dje@google.com>
+
+ * symfile.c (decrement_reading_symtab): Add assert.
+ (increment_reading_symtab): Ditto.
+
2013-05-09 Joel Brobecker <brobecker@adacore.com>
* source.c (forward_search_command): Replace call to getc
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 32d6ad0..36f5918 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -160,6 +160,7 @@ static void
decrement_reading_symtab (void *dummy)
{
currently_reading_symtab--;
+ gdb_assert (currently_reading_symtab >= 0);
}
/* Increment currently_reading_symtab and return a cleanup that can be
@@ -169,6 +170,7 @@ struct cleanup *
increment_reading_symtab (void)
{
++currently_reading_symtab;
+ gdb_assert (currently_reading_symtab > 0);
return make_cleanup (decrement_reading_symtab, NULL);
}