diff options
author | Tom Tromey <tom@tromey.com> | 2017-04-06 20:27:10 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2017-04-12 11:16:17 -0600 |
commit | c83dd8672698bcdf48d27e267e481230075f5900 (patch) | |
tree | 3a32b27c8908e22f0698bf29661b1aa4aa2a3b47 /gdb/psymtab.c | |
parent | 0e8621a0bec2d0840b853c4104614f345f0569ca (diff) | |
download | gdb-c83dd8672698bcdf48d27e267e481230075f5900.zip gdb-c83dd8672698bcdf48d27e267e481230075f5900.tar.gz gdb-c83dd8672698bcdf48d27e267e481230075f5900.tar.bz2 |
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.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c index bdce8f2..bb482ee 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; |