aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-29 13:51:58 -0600
committerTom Tromey <tom@tromey.com>2018-06-18 13:16:45 -0600
commit06424eac62da949519c0c641fbc3e8372a9c7f0b (patch)
tree047b910268ca63e6c6d34502df1bdc5722366874 /gdb/objfiles.c
parentb4be9fadea469e2c937c81a8f1d3243206f9bcfc (diff)
downloadfsf-binutils-gdb-06424eac62da949519c0c641fbc3e8372a9c7f0b.zip
fsf-binutils-gdb-06424eac62da949519c0c641fbc3e8372a9c7f0b.tar.gz
fsf-binutils-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.c21
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