diff options
author | Tom Tromey <tom@tromey.com> | 2018-05-29 13:51:58 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-06-18 13:16:45 -0600 |
commit | 06424eac62da949519c0c641fbc3e8372a9c7f0b (patch) | |
tree | 047b910268ca63e6c6d34502df1bdc5722366874 /gdb/objfiles.c | |
parent | b4be9fadea469e2c937c81a8f1d3243206f9bcfc (diff) | |
download | gdb-06424eac62da949519c0c641fbc3e8372a9c7f0b.zip gdb-06424eac62da949519c0c641fbc3e8372a9c7f0b.tar.gz gdb-06424eac62da949519c0c641fbc3e8372a9c7f0b.tar.bz2 |
Remove resume_section_map_updates_cleanup
This removes resume_section_map_updates_cleanup, replacing it with a
scoped_restore.
Tested by the buildbot.
gdb/ChangeLog
2018-06-18 Tom Tromey <tom@tromey.com>
* objfiles.h (inhibit_section_map_updates): Update.
(resume_section_map_updates, resume_section_map_updates_cleanup):
Remove.
* solib-svr4.c (svr4_handle_solib_event): Update.
* objfiles.c (inhibit_section_map_updates): Return
scoped_restore_tmpl<int>.
(resume_section_map_updates, resume_section_map_updates_cleanup):
Remove.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r-- | gdb/objfiles.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 0432ce6..95c39cf 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -1455,26 +1455,11 @@ objfiles_changed (void) /* See comments in objfiles.h. */ -void +scoped_restore_tmpl<int> inhibit_section_map_updates (struct program_space *pspace) { - get_objfile_pspace_data (pspace)->inhibit_updates = 1; -} - -/* See comments in objfiles.h. */ - -void -resume_section_map_updates (struct program_space *pspace) -{ - get_objfile_pspace_data (pspace)->inhibit_updates = 0; -} - -/* See comments in objfiles.h. */ - -void -resume_section_map_updates_cleanup (void *arg) -{ - resume_section_map_updates ((struct program_space *) arg); + return scoped_restore_tmpl<int> + (&get_objfile_pspace_data (pspace)->inhibit_updates, 1); } /* Return 1 if ADDR maps into one of the sections of OBJFILE and 0 |