aboutsummaryrefslogtreecommitdiff
path: root/gdb/psymtab.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-04-06 20:27:10 -0600
committerTom Tromey <tom@tromey.com>2017-04-12 11:16:17 -0600
commitc83dd8672698bcdf48d27e267e481230075f5900 (patch)
tree3a32b27c8908e22f0698bf29661b1aa4aa2a3b47 /gdb/psymtab.c
parent0e8621a0bec2d0840b853c4104614f345f0569ca (diff)
Change increment_reading_symtab to return a scoped_restore
This changes increment_reading_symtab to return a scoped_restore, then fixes up the users. gdb/ChangeLog 2017-04-12 Tom Tromey <tom@tromey.com> * symfile.h (increment_reading_symtab): Update type. * symfile.c (decrement_reading_symtab): Remove. (increment_reading_symtab): Return a scoped_restore_tmpl<int>. * psymtab.c (psymtab_to_symtab): Update. * dwarf2read.c (dw2_instantiate_symtab): Update.
Diffstat (limited to 'gdb/psymtab.c')
-rw-r--r--gdb/psymtab.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index bdce8f239a..bb482ee2cb 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -770,10 +770,9 @@ psymtab_to_symtab (struct objfile *objfile, struct partial_symtab *pst)
/* If it has not yet been read in, read it. */
if (!pst->readin)
{
- struct cleanup *back_to = increment_reading_symtab ();
+ scoped_restore decrementer = increment_reading_symtab ();
(*pst->read_symtab) (pst, objfile);
- do_cleanups (back_to);
}
return pst->compunit_symtab;