aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c2
1 files changed, 2 insertions, 0 deletions
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);
}